]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/scrub: skip backtrace scrub for inode 0x1 mds_scrub-ignore-inode-0x1-for-backtrace-check
authorMilind Changire <mchangir@redhat.com>
Wed, 26 May 2021 09:30:03 +0000 (15:00 +0530)
committerMilind Changire <mchangir@redhat.com>
Wed, 26 May 2021 09:30:03 +0000 (15:00 +0530)
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 <mchangir@redhat.com>
src/mds/CInode.cc

index 4e47fdf7869aa26dd91f1dee0febbb9226b29f9b..4963d43dd372487f27a38c90f2ef73a982ce4204 100644 (file)
@@ -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;