From 7757f3ea3c1aebb71fd34454751634a822c021bd Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Wed, 2 Jun 2021 15:12:09 +0530 Subject: [PATCH] mds/scrub: write root inode backtrace at creation 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 --- src/mds/MDCache.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index cb54c4f79ebc9..510f85945b888 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -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) -- 2.39.5