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-09-01 10:57:33 -0700
commit005816536cea0de47452720a09841ba31c841169 (patch)
tree0f170629b9f4d0ac57057115a6a467b660e55df1
parent284bf62ccff3eda828aa1bdcbbc8903b0adb2a41 (diff)
downloadceph-005816536cea0de47452720a09841ba31c841169.tar.gz
PGMap: calc_min_last_epoch_clean() will now also use osd_epochswip-5869-DNM
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;
}