If we also consider down osds, we may very well be in a healthy state
but keeping maps as far back as the last epoch when a given osd went
down. If said osd stays down for eons, we will be keeping bajillions of
maps that we shouldn't.
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
{
f->open_array_section("per_pool");
- for (auto it : report_by_pool) {
+ for (auto& it : report_by_pool) {
f->open_object_section("pool");
f->dump_unsigned("poolid", it.first);
f->dump_unsigned("floor", it.second.floor);
// also scan osd epochs
// don't trim past the oldest reported osd epoch
for (auto& osd_epoch : osd_epochs) {
- if (osd_epoch.second < floor) {
+ if (osd_epoch.second < floor &&
+ osdmap.is_out(osd_epoch.first)) {
floor = osd_epoch.second;
}
}