From 785e58ebde5723f340e8bb5e3b6f34b9c6b0f392 Mon Sep 17 00:00:00 2001
From: Li Wang
Date: Fri, 13 Nov 2015 15:00:09 +0800
Subject: [PATCH] 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
---
src/osd/PGBackend.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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();
--
2.47.3