m_fsm->process_event(StartScrub{});
dout(10) << "scrubber event --<< StartScrub" << dendl;
} else {
- clear_queued_or_active();
- // and just in case snap trimming was blocked by the aborted scrub
- m_pg->snap_trimmer_scrub_complete();
+ clear_queued_or_active(); // also restarts snap trimming
}
}
m_fsm->process_event(AfterRepairScrub{});
dout(10) << "scrubber event --<< AfterRepairScrub" << dendl;
} else {
- clear_queued_or_active();
- // and just in case snap trimming was blocked by the aborted scrub
- m_pg->snap_trimmer_scrub_complete();
+ clear_queued_or_active(); // also restarts snap trimming
}
}
{
dout(10) << __func__ << " input: " << request << dendl;
+ set_queued_or_active(); // we are fully committed now.
+
// write down the epoch of starting a new scrub. Will be used
// to discard stale messages from previous aborted scrubs.
m_epoch_start = m_pg->get_osdmap_epoch();
void PgScrubber::clear_queued_or_active()
{
- m_queued_or_active = false;
+ if (m_queued_or_active) {
+ m_queued_or_active = false;
+ // and just in case snap trimming was blocked by the aborted scrub
+ m_pg->snap_trimmer_scrub_complete();
+ }
}
bool PgScrubber::is_queued_or_active() const
if (m_pg->is_active() && m_pg->is_primary()) {
m_pg->recovery_state.share_pg_info();
}
-
- // we may have blocked the snap trimmer
- m_pg->snap_trimmer_scrub_complete();
}
void PgScrubber::on_digest_updates()
}
}
+void PgScrubber::log_cluster_warning(const std::string& warning) const
+{
+ m_osds->clog->do_log(CLOG_WARN, warning);
+}
+
ostream& PgScrubber::show(ostream& out) const
{
return out << " [ " << m_pg_id << ": " << m_flags << " ] ";