this is a cleanup. if we don't take the osd_epochs of osd marked out,
there is no need to keep those osd_epochs around anymore. so, in this
change, once the osd is marked in or out, we just drop its osd_epochs
right away.
Signed-off-by: Kefu Chai <kchai@redhat.com>
// could be marked up *or* down, but we're too lazy to check which
last_osd_report.erase(osd_state.first);
}
- if (osd_state.second & CEPH_OSD_EXISTS) {
- // could be created *or* destroyed, but we can safely drop it
- osd_epochs.erase(osd_state.first);
+ if (osd_state.second & CEPH_OSD_OUT) {
+ // could be marked in *or* out, but we can safely drop it
+ osd_epochs.erase(osd_state.first);
}
}
}
// also scan osd epochs
// don't trim past the oldest reported osd epoch
for (auto [osd, epoch] : osd_epochs) {
- if (epoch < floor &&
- osdmap.is_in(osd)) {
+ if (epoch < floor) {
floor = epoch;
}
}