summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-08-09 17:59:25 -0700
committerSamuel Just <sam.just@inktank.com>2013-10-01 12:35:30 -0700
commit624aac907614b6b6e6852dc1ef284401bcaff5bc (patch)
treefb183280e2afdac386fc5066d9815d3b27fa6709
parent4d6f2d35df59c293264b6afea2fdb676ccc14ff3 (diff)
downloadceph-624aac907614b6b6e6852dc1ef284401bcaff5bc.tar.gz
PGMap: calc_min_last_epoch_clean() will now also use osd_epochs
We don't want to trim past the current osd map for any up osd. osd_epochs provides a lower bound for that epoch for each osd. Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/mon/PGMap.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc
index 2cbf1a6c2fb..516c8dd8b9b 100644
--- a/src/mon/PGMap.cc
+++ b/src/mon/PGMap.cc
@@ -432,6 +432,14 @@ epoch_t PGMap::calc_min_last_epoch_clean() const
if (lec < min)
min = lec;
}
+ // also scan osd epochs
+ // don't trim past the oldest reported osd epoch
+ for (hash_map<int32_t, epoch_t>::const_iterator i = osd_epochs.begin();
+ i != osd_epochs.end();
+ ++i) {
+ if (i->second < min)
+ min = i->second;
+ }
return min;
}