mon: fix last_clean_interval calculation

This up_rom == first check is old and wrong.  It may have been correct at
the time, when the OSD had a defined shutdown procedure, but that is not
currently the case.  And if/when it is, the OSD can simply provide an
accurate clean_thru value.

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2011-10-21 14:45:59 -07:00
parent cf6a9404f0
commit 035930198d

View File

@ -641,11 +641,6 @@ bool OSDMonitor::prepare_boot(MOSDBoot *m)
epoch_t first = m->sb.mounted;
epoch_t last = m->sb.clean_thru;
// adjust clean interval forward to the epoch the osd was actually marked down.
if (info.up_from == first &&
(info.down_at-1) > last)
last = info.down_at-1;
dout(10) << "prepare_boot osd." << from << " last_clean_interval "
<< info.last_clean_first << "-" << info.last_clean_last
<< " -> " << first << "-" << last