]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Improve logic in be_compare_scrubmaps()
authorDavid Zafman <dzafman@redhat.com>
Mon, 23 Jul 2018 22:54:16 +0000 (15:54 -0700)
committerDavid Zafman <dzafman@redhat.com>
Thu, 26 Jul 2018 18:38:32 +0000 (11:38 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 135d5d0209fd6441a470fd2301c6c0e2ec803091)

src/osd/PGBackend.cc

index 7c508adf396d5ddb102f6fa2b9111404f3efddc4..9de873d83b525a9805bde044fb4e4eec7f7046b4 100644 (file)
@@ -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.