]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/cephfs: make cephfs-data-scan create snaprealm for base inodes
authorYan, Zheng <zyan@redhat.com>
Sat, 17 Mar 2018 05:04:15 +0000 (13:04 +0800)
committerYan, Zheng <zyan@redhat.com>
Sun, 18 Mar 2018 14:24:48 +0000 (22:24 +0800)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/tools/cephfs/DataScan.cc

index f8bf524097a7a8017b79ffbde39f5ecea2090dcd..ec009ba03a373425d748cdcae0b8f1e2fea24dea 100644 (file)
@@ -365,6 +365,12 @@ int MetadataDriver::inject_unlinked_inode(
   // be ignoring dirfrags that exist
   inode.damage_flags |= (DAMAGE_STATS | DAMAGE_RSTATS | DAMAGE_FRAGTREE);
 
+  if (inono == MDS_INO_ROOT || MDS_INO_IS_MDSDIR(inono)) {
+    sr_t srnode;
+    srnode.seq = 1;
+    encode(srnode, inode.snap_blob);
+  }
+
   // Serialize
   bufferlist inode_bl;
   encode(std::string(CEPH_FS_ONDISK_MAGIC), inode_bl);