]> 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)
committerSage Weil <sage@inktank.com>
Mon, 4 Mar 2013 21:54:04 +0000 (13:54 -0800)
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 67225339dc3d62d7fe5a32eec65d51e53e8d35bb)

src/osd/PG.cc

index 3c10230c41ac8ff4d94a21ae490a7f9fb63a7f16..a8b16da3126406d227e22a0de857d5aed843f422 100644 (file)
@@ -3224,7 +3224,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();
 
@@ -3239,7 +3239,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;
   }