From 477ac92984dbddb2526b216fa5ab0eaf4590dc6b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 19 Mar 2015 16:27:17 -0700 Subject: [PATCH] osd: only complain about stored vs actual digest if all peers support it If we have a mixed cluster of hammer and pre-hammer OSDs, we will fall back to using 0 as the initial crc32c value. However, if the primary has a stored digest, it currently compares its value to the reported value (w/ the wrong initial value) and complains. There are two possible fixes: - avoid storing a digest if all peers don't support it, or - avoid complaining on scrub if all peers don't support it. The latter is easier, and this fix also has the benefit of fixing the bug even for clusters where this has already happened. Fixes: #11102 Signed-off-by: Sage Weil --- src/osd/ReplicatedPG.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 156d46eecae..15e1a856e24 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -12901,7 +12901,8 @@ void ReplicatedPG::_scrub( dout(20) << mode << " " << soid << " " << oi << dendl; - if (pool.info.is_replicated()) { + if (pool.info.is_replicated() && + (get_min_peer_features() & CEPH_FEATURE_OSD_OBJECT_DIGEST)) { if (oi.is_data_digest() && p->second.digest_present && oi.data_digest != p->second.digest) { osd->clog->error() << mode << " " << info.pgid << " " << soid -- 2.47.3