summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-02-25 12:40:06 -0800
committerSage Weil <sage@inktank.com>2013-03-04 13:54:04 -0800
commit83e9aa5038ee743d6f9eb8995bdb5ae0e87dfee2 (patch)
tree2b407a70f086586cb26013e9bc37f04b22372dcc
parent9e4722595cf749f4735db92dd0d7a3039b4a24db (diff)
downloadceph-83e9aa5038ee743d6f9eb8995bdb5ae0e87dfee2.tar.gz
PG::build_scrub_map: detect race with peering via last_peering_reset
Signed-off-by: Samuel Just <sam.just@inktank.com> (cherry picked from commit 67225339dc3d62d7fe5a32eec65d51e53e8d35bb)
-rw-r--r--src/osd/PG.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index 3c10230c41a..a8b16da3126 100644
--- a/src/osd/PG.cc
+++ b/src/osd/PG.cc
@@ -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;
}