]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: move snap inode to new dirfrag's dirty_rstat_inodes
authorYan, Zheng <zyan@redhat.com>
Thu, 9 Apr 2015 09:42:31 +0000 (17:42 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 21 Apr 2015 05:56:16 +0000 (13:56 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/CDir.cc

index 384437a6078f65ca742d4970423a2ecbfe6b2500..f17740eb79dc92cf651dac65bceef7d3a2f2e300 100644 (file)
@@ -822,8 +822,14 @@ void CDir::steal_dentry(CDentry *dn)
       else
        fnode.fragstat.nfiles++;
     }
-  } else
-      num_snap_items++;
+  } else {
+    num_snap_items++;
+    if (dn->get_linkage()->is_primary()) {
+      CInode *in = dn->get_linkage()->get_inode();
+      if (in->is_dirty_rstat())
+       dirty_rstat_inodes.push_back(&in->dirty_rstat_item);
+    }
+  }
 
   if (dn->auth_pins || dn->nested_auth_pins) {
     // use the helpers here to maintain the auth_pin invariants on the dir inode