summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}