]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::build_scrub_map: detect race with peering via last_peering_reset
authorSamuel Just <sam.just@inktank.com>
Mon, 25 Feb 2013 20:40:06 +0000 (12:40 -0800)
committerSamuel Just <sam.just@inktank.com>
Mon, 25 Feb 2013 21:30:11 +0000 (13:30 -0800)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc

index 9974ee082dd851f06e2412a91eea109a73daa703..36266f5f2b6baa49b5710a9da05eb36f40bad6c6 100644 (file)
@@ -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;
   }