diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-09-23 21:19:11 +0800 |
---|---|---|
committer | Yan, Zheng <zheng.z.yan@intel.com> | 2013-09-24 15:24:42 +0800 |
commit | 2a4d21b6d7686d7e6a7f776a766f09663b646e1d (patch) | |
tree | 9fda98346a8a567d3284322bd3aa8f3cc8f78573 | |
parent | 9e6b0404a867c074607a03ce4e7d46c46b903b7a (diff) | |
download | ceph-wip-dirfrag.tar.gz |
mds: don't scatter gather update bare-bones dirfragswip-dirfrag
avoid adding bare-bones dirfrag that has not yet been fetched from
the disk to the journal.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r-- | src/mds/CInode.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index a95a892684f..05df834f588 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -1768,7 +1768,7 @@ void CInode::finish_scatter_gather_update(int type) CDir *dir = p->second; dout(20) << fg << " " << *dir << dendl; - bool update = dir->is_auth() && !dir->is_frozen(); + bool update = dir->is_auth() && dir->get_version() != 0 && !dir->is_frozen(); fnode_t *pf = dir->get_projected_fnode(); if (update) @@ -1849,7 +1849,7 @@ void CInode::finish_scatter_gather_update(int type) CDir *dir = p->second; dout(20) << fg << " " << *dir << dendl; - bool update = dir->is_auth() && !dir->is_frozen(); + bool update = dir->is_auth() && dir->get_version() != 0 && !dir->is_frozen(); fnode_t *pf = dir->get_projected_fnode(); if (update) @@ -1936,7 +1936,7 @@ void CInode::finish_scatter_gather_update_accounted(int type, Mutation *mut, EMe p != dirfrags.end(); ++p) { CDir *dir = p->second; - if (!dir->is_auth() || dir->is_frozen()) + if (!dir->is_auth() || dir->get_version() == 0 || dir->is_frozen()) continue; if (type == CEPH_LOCK_IDFT) |