From: Sage Weil Date: Thu, 26 Mar 2015 20:44:25 +0000 (-0700) Subject: osd: be precise about "known" vs "best guess" X-Git-Tag: v9.0.2~189^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=546d1c7b8224d96d0cc93dc3c96f52787cd69413;p=ceph.git osd: be precise about "known" vs "best guess" We cannot assume that the auth info has the "known" digest; all replicas may have a matching digest that does not match the oi, or we may choose a different auth info for some other reason. Verify that the digest matches the oi before calling it "known". Signed-off-by: Sage Weil --- diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index 535b2a6c878b..ada84a6d3d0f 100644 --- a/src/osd/PGBackend.cc +++ b/src/osd/PGBackend.cc @@ -390,9 +390,11 @@ enum scrub_error_type PGBackend::be_compare_scrub_objects( if (error != CLEAN) errorstream << ", "; error = DEEP_ERROR; + bool known = okseed && auth_oi.is_data_digest() && + auth.digest == auth_oi.data_digest; errorstream << "data_digest 0x" << std::hex << candidate.digest << " != " - << (auth_oi.is_data_digest() && okseed ? "known" : "best guess") + << (known ? "known" : "best guess") << " data_digest 0x" << auth.digest << std::dec << " from auth shard " << auth_shard; } @@ -402,9 +404,11 @@ enum scrub_error_type PGBackend::be_compare_scrub_objects( if (error != CLEAN) errorstream << ", "; error = DEEP_ERROR; + bool known = okseed && auth_oi.is_omap_digest() && + auth.digest == auth_oi.omap_digest; errorstream << "omap_digest 0x" << std::hex << candidate.omap_digest << " != " - << (auth_oi.is_omap_digest() && okseed ? "known" : "best guess") + << (known ? "known" : "best guess") << " omap_digest 0x" << auth.omap_digest << std::dec << " from auth shard " << auth_shard; }