]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: When scrub finds an attr error mark shard inconsistent 15368/head
authorDavid Zafman <dzafman@redhat.com>
Fri, 26 May 2017 00:22:50 +0000 (17:22 -0700)
committerDavid Zafman <dzafman@redhat.com>
Tue, 30 May 2017 16:32:53 +0000 (09:32 -0700)
Fixes: http://tracker.ceph.com/issues/20089
Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/PGBackend.cc

index fab9ee826642c676747668e9f08f706a8fd38d65..57e4c001ef64fe8aca3f1a1f9818d79565df3834 100644 (file)
@@ -782,16 +782,15 @@ void PGBackend::be_compare_scrubmaps(
                                   object_error,
                                   ss);
        // Some errors might have already been set in be_select_auth_object()
-       if (shard_map[j->first].errors != 0) {
+       if (found || shard_map[j->first].errors != 0) {
          cur_inconsistent.insert(j->first);
           if (shard_map[j->first].has_deep_errors())
            ++deep_errors;
-         else
+         else if (shard_map[j->first].has_shallow_errors())
            ++shallow_errors;
          // Only true if be_compare_scrub_objects() found errors and put something
          // in ss.
-         if (found)
-           errorstream << pgid << " shard " << j->first << ": soid " << *k
+         errorstream << pgid << " shard " << j->first << ": soid " << *k
                      << " " << ss.str() << "\n";
        } else {
          // XXX: The auth shard might get here that we don't know