From: Milind Changire Date: Wed, 26 May 2021 09:30:03 +0000 (+0530) Subject: mds/scrub: skip backtrace scrub for inode 0x1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=05c76940b71e8eb8bbcb8d23c94e0100fbd8e234;p=ceph.git mds/scrub: skip backtrace scrub for inode 0x1 Since a backtrace for inode 0x1 doesn't exist and doesn't make sense it is wise to skip this inode and declare it as passed. Fixes: https://tracker.ceph.com/issues/50976 Signed-off-by: Milind Changire --- diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index 4e47fdf7869aa..4963d43dd3724 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -4684,8 +4684,9 @@ void CInode::validate_disk_state(CInode::validated_data *results, if (results->backtrace.ondisk_read_retval != 0) { results->backtrace.error_str << "failed to read off disk; see retval"; // we probably have a new unwritten file! + // or backtrace for root inode (inode 0x1) doesn't make sense // so skip the backtrace scrub for this entry and say that all's well - if (in->is_dirty_parent()) { + if (in->is_dirty_parent() || in->ino() == MDS_INO_ROOT) { dout(20) << "forcing backtrace as passed since inode is dirty parent" << dendl; results->backtrace.passed = true; } @@ -4708,8 +4709,9 @@ void CInode::validate_disk_state(CInode::validated_data *results, results->backtrace.error_str << "failed to decode on-disk backtrace (" << bl.length() << " bytes)!"; // we probably have a new unwritten file! + // or backtrace for root inode (inode 0x1) doesn't make sense // so skip the backtrace scrub for this entry and say that all's well - if (in->is_dirty_parent()) { + if (in->is_dirty_parent() || in->ino() == MDS_INO_ROOT) { dout(20) << "decode failed; forcing backtrace as passed since " "inode is dirty parent" << dendl; results->backtrace.passed = true;