From: Samuel Just Date: Mon, 25 Feb 2013 20:40:06 +0000 (-0800) Subject: PG::build_scrub_map: detect race with peering via last_peering_reset X-Git-Tag: v0.59~104^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=67225339dc3d62d7fe5a32eec65d51e53e8d35bb;p=ceph.git PG::build_scrub_map: detect race with peering via last_peering_reset Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 9974ee082dd8..36266f5f2b6b 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -3239,7 +3239,7 @@ void PG::build_scrub_map(ScrubMap &map) dout(10) << "build_scrub_map" << dendl; map.valid_through = info.last_update; - epoch_t epoch = info.history.same_interval_since; + epoch_t epoch = get_osdmap()->get_epoch(); unlock(); @@ -3254,7 +3254,7 @@ void PG::build_scrub_map(ScrubMap &map) _scan_list(map, ls, false); lock(); - if (epoch != info.history.same_interval_since) { + if (epoch < last_peering_reset) { dout(10) << "scrub pg changed, aborting" << dendl; return; }