diff options
author | Sage Weil <sage@redhat.com> | 2015-03-26 21:44:25 +0100 |
---|---|---|
committer | Sage Weil <sage@redhat.com> | 2015-04-07 20:42:14 +0200 |
commit | 546d1c7b8224d96d0cc93dc3c96f52787cd69413 (patch) | |
tree | 3c85ca1b25f5fc4d53cc27e7da6b3cb9ea9d11cd /src/osd/PGBackend.cc | |
parent | osd: record digest if object is clean (vs entire scrub chunk) (diff) | |
download | ceph-546d1c7b8224d96d0cc93dc3c96f52787cd69413.tar.xz ceph-546d1c7b8224d96d0cc93dc3c96f52787cd69413.zip |
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 <sage@redhat.com>
Diffstat (limited to 'src/osd/PGBackend.cc')
-rw-r--r-- | src/osd/PGBackend.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index 535b2a6c878..ada84a6d3d0 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; } |