]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't scatter gather update bare-bones dirfrags
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 23 Sep 2013 13:19:11 +0000 (21:19 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Sat, 5 Oct 2013 03:31:12 +0000 (11:31 +0800)
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>
src/mds/CInode.cc

index a95a892684f663d9b5ef1761bcf24d48416581a2..05df834f5882197418eaf220c5a391e9101e18f4 100644 (file)
@@ -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)