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: v12.2.3~17^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f19f1e1cbc5b23eeb028c015c77ffe32306aba64;p=ceph.git mds: don't report repaired backtraces in damagetable Fixes: http://tracker.ceph.com/issues/18743 Signed-off-by: John Spray (cherry picked from commit 444382c3370bafa21564bb1e6a5c80f3e4825f6a) --- diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index 1144fce1cb23..3a8ae50c3c79 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -3951,6 +3951,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 99f12de927f3..658807d5a206 100644 --- a/src/mds/CInode.h +++ b/src/mds/CInode.h @@ -1099,14 +1099,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 2a595acdd7a4..7626b4e61a12 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);