From: David Zafman Date: Mon, 23 Jul 2018 22:54:16 +0000 (-0700) Subject: osd: Improve logic in be_compare_scrubmaps() X-Git-Tag: v12.2.8~71^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a7012bf7c6f4686ddd6efdd6b8a8a55093d21591;p=ceph.git osd: Improve logic in be_compare_scrubmaps() Signed-off-by: David Zafman (cherry picked from commit 135d5d0209fd6441a470fd2301c6c0e2ec803091) --- diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index 7c508adf396d..9de873d83b52 100644 --- a/src/osd/PGBackend.cc +++ b/src/osd/PGBackend.cc @@ -1002,11 +1002,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.