]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Improve logic in be_compare_scrubmaps()
authorDavid Zafman <dzafman@redhat.com>
Wed, 25 Jul 2018 19:10:57 +0000 (12:10 -0700)
committerDavid Zafman <dzafman@redhat.com>
Thu, 26 Jul 2018 00:33:53 +0000 (17:33 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/PGBackend.cc

index 13459844779e3f7413e01070b62b057df770a006..6977030e7061e1779185642e1fc05c81306a9db8 100644 (file)
@@ -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.