From: Sage Weil Date: Thu, 19 Mar 2015 23:27:17 +0000 (-0700) Subject: osd: only complain about stored vs actual digest if all peers support it X-Git-Tag: v0.94~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F4107%2Fhead;p=ceph.git 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 --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 156d46eecae4..15e1a856e245 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