From: Yan, Zheng Date: Mon, 23 Sep 2013 13:19:11 +0000 (+0800) Subject: mds: don't scatter gather update bare-bones dirfrags X-Git-Tag: v0.72-rc1~39^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=576da8e5073cb76986c9925eaa230952b62c5da9;p=ceph.git 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 --- diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index a95a892684f6..05df834f5882 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)