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-04 13:49:55 -0700
commitc8a4411db11b085ea0678bcf3f51aa411bd3e106 (patch)
tree4f4936e449017250f9c1cc355bb9a616eca6c735
parent091809b8149c7595cbcca439c5b8b75a0c42efe1 (diff)
downloadceph-c8a4411db11b085ea0678bcf3f51aa411bd3e106.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. Fixes: 5869 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 0b40e9264ce..13a2af33213 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;
}