From cc525b3a3e19c3239d9c3c5118e61ab22f89df1f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 8 Feb 2011 08:41:52 -0800 Subject: [PATCH] osd: discard scrub reply if pg changed build_scrub_map will bail out if the pg changed. Discard the result in that case since the primary will ignore it anyway. Signed-off-by: Sage Weil --- src/osd/PG.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index bfba1333e118e..18d4575e15436 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -3115,6 +3115,12 @@ void PG::replica_scrub(MOSDRepScrub *msg) build_scrub_map(map); } + if (msg->map_epoch < info.history.same_acting_since) { + dout(10) << "replica_scrub discarding old replica_scrub result from " + << msg->map_epoch << " < " << info.history.same_acting_since << dendl; + return; + } + vector scrub(1); scrub[0].op.op = CEPH_OSD_OP_SCRUB_MAP; sobject_t poid; -- 2.39.5