]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/scrub: write root inode backtrace at creation 41639/head
authorMilind Changire <mchangir@redhat.com>
Wed, 2 Jun 2021 09:42:09 +0000 (15:12 +0530)
committerMilind Changire <mchangir@redhat.com>
Wed, 2 Jun 2021 09:42:09 +0000 (15:12 +0530)
Write root inode backtrace as soon as it is created;
Unwritten backtrace always caused scrub to fail for root inode.

Fixes: https://tracker.ceph.com/issues/50976
Signed-off-by: Milind Changire <mchangir@redhat.com>
src/mds/MDCache.cc

index cb54c4f79ebc95dce336bcade52e2725ebc5dde8..510f85945b888e0b0a478ab8b094a083d2409637 100644 (file)
@@ -441,6 +441,8 @@ void MDCache::create_empty_hierarchy(MDSGather *gather)
   rootdir->commit(0, gather->new_sub());
 
   root->store(gather->new_sub());
+  root->mark_dirty_parent(mds->mdlog->get_current_segment(), true);
+  root->store_backtrace(gather->new_sub());
 }
 
 void MDCache::create_mydir_hierarchy(MDSGather *gather)