]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: be slightly paranoid about value of okseed
authorSage Weil <sage@redhat.com>
Thu, 26 Mar 2015 20:46:22 +0000 (13:46 -0700)
committerDavid Zafman <dzafman@redhat.com>
Tue, 4 Aug 2015 14:39:00 +0000 (07:39 -0700)
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 <sage@redhat.com>
(cherry picked from commit e34d31b7a9a71132a17b95cf5ad60255ece60243)

src/osd/PG.cc

index bfe59b79c821626d9ceb0be98c697abf9348e5f7..4e898cca178175c91f6deaebbcd86f655855a5a2 100644 (file)
@@ -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,