]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/scrub: write root inode backtrace at creation 41685/head
authorMilind Changire <mchangir@redhat.com>
Wed, 2 Jun 2021 09:42:09 +0000 (15:12 +0530)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 4 Jun 2021 02:14:08 +0000 (19:14 -0700)
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>
(cherry picked from commit 7757f3ea3c1aebb71fd34454751634a822c021bd)

src/mds/MDCache.cc

index 189c99b0bf372c283ca38112fc7285b08e3b207b..37a36179fd62300c33ff7aa1bb09721dd4f21988 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)