From: Li Wang
Date: Fri, 13 Nov 2015 07:00:09 +0000 (+0800)
Subject: scrub: clarify the result report
X-Git-Tag: v10.0.1~79^2
X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6534%2Fhead;p=ceph.git
scrub: clarify the result report
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
---
diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc
index f42e6bee02ed..7a7f6df95b05 100644
--- a/src/osd/PGBackend.cc
+++ b/src/osd/PGBackend.cc
@@ -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::const_iterator i = auth.attrs.begin();
i != auth.attrs.end();