Previously, we'd only set CLEAN if we were not also remapped, but we'd
set last_epoch_clean anyway. Unfortunately, that wasn't consistent with
pg_stat_t::get_effective_last_epoch_clean() which requires that the
CLEAN bit be set to continue trimming while the pg state isn't changing.
Signed-off-by: Samuel Just <sjust@redhat.com>
void PG::mark_clean()
{
- // only mark CLEAN if we have the desired number of replicas AND we
- // are not remapped.
- if (actingset.size() == get_osdmap()->get_pg_size(info.pgid.pgid) &&
- up == acting)
+ if (actingset.size() == get_osdmap()->get_pg_size(info.pgid.pgid)) {
state_set(PG_STATE_CLEAN);
-
- // NOTE: this is actually a bit premature: we haven't purged the
- // strays yet.
- info.history.last_epoch_clean = get_osdmap()->get_epoch();
- info.history.last_interval_clean = info.history.same_interval_since;
-
- past_intervals.clear();
- dirty_big_info = true;
-
- dirty_info = true;
+ info.history.last_epoch_clean = get_osdmap()->get_epoch();
+ info.history.last_interval_clean = info.history.same_interval_since;
+ past_intervals.clear();
+ dirty_big_info = true;
+ dirty_info = true;
+ }
kick_snap_trim();
}