From: John Spray Date: Wed, 25 Oct 2017 09:24:52 +0000 (-0400) Subject: mds: don't report repaired backtraces in damagetable X-Git-Tag: v13.0.1~293^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=444382c3370bafa21564bb1e6a5c80f3e4825f6a;p=ceph.git mds: don't report repaired backtraces in damagetable Fixes: http://tracker.ceph.com/issues/18743 Signed-off-by: John Spray --- diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index 58a47800976..f1974c54ce8 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -3955,6 +3955,7 @@ next: << "(" << path << "), rewriting it"; in->_mark_dirty_parent(in->mdcache->mds->mdlog->get_current_segment(), false); + results->backtrace.repaired = true; } // If the inode's number was free in the InoTable, fix that diff --git a/src/mds/CInode.h b/src/mds/CInode.h index d0a49d1feb5..2ced5b22b35 100644 --- a/src/mds/CInode.h +++ b/src/mds/CInode.h @@ -1108,14 +1108,13 @@ public: */ struct validated_data { templatestruct member_status { - bool checked; - bool passed; - int ondisk_read_retval; + bool checked = false; + bool passed = false; + bool repaired = false; + int ondisk_read_retval = 0; T ondisk_value; T memory_value; std::stringstream error_str; - member_status() : checked(false), passed(false), - ondisk_read_retval(0) {} }; bool performed_validation; diff --git a/src/mds/ScrubStack.cc b/src/mds/ScrubStack.cc index 2a595acdd7a..7626b4e61a1 100644 --- a/src/mds/ScrubStack.cc +++ b/src/mds/ScrubStack.cc @@ -376,7 +376,9 @@ void ScrubStack::_validate_inode_done(CInode *in, int r, in->make_path_string(path, true); } - if (result.backtrace.checked && !result.backtrace.passed) { + if (result.backtrace.checked && !result.backtrace.passed + && !result.backtrace.repaired) + { // Record backtrace fails as remote linkage damage, as // we may not be able to resolve hard links to this inode mdcache->mds->damage_table.notify_remote_damaged(in->inode.ino, path);