]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
scrub: clarify the result report 6534/head
authorLi Wang <li.wang@kylin-cloud.com>
Fri, 13 Nov 2015 07:00:09 +0000 (15:00 +0800)
committerLi Wang <li.wang@kylin-cloud.com>
Fri, 13 Nov 2015 07:03:17 +0000 (15:03 +0800)
It may happen that the authoritative object
such that auth.size != be_get_ondisk_size(auth_oi.size),
in that case, clarify the error report.

Signed-off-by: Li Wang <li.wang@kylin-cloud.com>
src/osd/PGBackend.cc

index f42e6bee02ed26de69a47bc953bab4cbf51ef3ac..7a7f6df95b0507e31b54bd6dcd427546da225c34 100644 (file)
@@ -410,8 +410,11 @@ enum scrub_error_type PGBackend::be_compare_scrub_objects(
     if (error != CLEAN)
       errorstream << ", ";
     error = SHALLOW_ERROR;
+    bool known = auth.size == be_get_ondisk_size(auth_oi.size);
     errorstream << "size " << candidate.size
-               << " != known size " << auth.size;
+               << " != "
+                << (known ? "known" : "best guess")
+                << " size " << auth.size;
   }
   for (map<string,bufferptr>::const_iterator i = auth.attrs.begin();
        i != auth.attrs.end();