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-10-05 11:31:12 +0800 |
commit | 576da8e5073cb76986c9925eaa230952b62c5da9 (patch) | |
tree | 1d5f1b2127df1c7c1ce7da0492415de796108a0d | |
parent | c7db090b2a470052d450b363b9e76c36376dc11f (diff) | |
download | ceph-576da8e5073cb76986c9925eaa230952b62c5da9.tar.gz |
mds: don't scatter gather update bare-bones dirfrags
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) |