From: Sage Weil Date: Thu, 26 Mar 2015 20:46:22 +0000 (-0700) Subject: osd: be slightly paranoid about value of okseed X-Git-Tag: v9.0.2~189^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e34d31b7a9a71132a17b95cf5ad60255ece60243;p=ceph.git osd: be slightly paranoid about value of okseed The scrubber.seed value is set based on the peer feature; check for that too explicitly, and assert the scrubber.seed value matches. No change in behavior here. Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index bac9c48c9d61..cd2d79ecf898 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4174,9 +4174,13 @@ void PG::scrub_compare_maps() maps[*i] = &scrubber.received_maps[*i]; } + // can we relate scrub digests to oi digests? + bool okseed = (get_min_peer_features() & CEPH_FEATURE_OSD_OBJECT_DIGEST); + assert(okseed == (scrubber.seed == 0xffffffff)); + get_pgbackend()->be_compare_scrubmaps( maps, - scrubber.seed == 0xffffffff, // can we relate scrub digests to oi digests? + okseed, scrubber.missing, scrubber.inconsistent, authoritative,