From: Samuel Just Date: Sat, 10 Aug 2013 00:59:25 +0000 (-0700) Subject: PGMap: calc_min_last_epoch_clean() will now also use osd_epochs X-Git-Tag: v0.71~24^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c8a4411db11b085ea0678bcf3f51aa411bd3e106;p=ceph.git 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 --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 0b40e9264cea..13a2af33213c 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::const_iterator i = osd_epochs.begin(); + i != osd_epochs.end(); + ++i) { + if (i->second < min) + min = i->second; + } return min; }