From 674029bc6c519e82011d1429ab5eddff9720c2dc Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 26 Mar 2015 13:46:22 -0700 Subject: [PATCH] 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 (cherry picked from commit e34d31b7a9a71132a17b95cf5ad60255ece60243) --- src/osd/PG.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index bfe59b79c821..4e898cca1781 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4189,9 +4189,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, -- 2.47.3