From 135d5d0209fd6441a470fd2301c6c0e2ec803091 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Wed, 25 Jul 2018 12:10:57 -0700 Subject: [PATCH] osd: Improve logic in be_compare_scrubmaps() Signed-off-by: David Zafman --- src/osd/PGBackend.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index 13459844779e3..6977030e7061e 100644 --- a/src/osd/PGBackend.cc +++ b/src/osd/PGBackend.cc @@ -1001,11 +1001,12 @@ void PGBackend::be_compare_scrubmaps( if (found) errorstream << pgid << " shard " << j->first << ": soid " << *k << " " << ss.str() << "\n"; - } else if (found) { + } else if (object_error.errors != 0) { // Track possible shard to use as authoritative, if needed // There are errors, without identifying the shard object_errors.insert(j->first); - errorstream << pgid << " : soid " << *k << " " << ss.str() << "\n"; + if (found) + errorstream << pgid << " : soid " << *k << " " << ss.str() << "\n"; } else { // XXX: The auth shard might get here that we don't know // that it has the "correct" data. -- 2.39.5