m_osds->sleep_timer.cancel_event(token);
}
-LogChannelRef &PgScrubber::get_clog() const
+LogChannelRef& PgScrubber::get_clog() const
{
return m_osds->clog;
}
return m_osds->whoami;
}
+[[nodiscard]] bool PgScrubber::is_high_priority() const
+{
+ return m_flags.required;
+}
+
/*
* The selected range is set directly into 'm_start' and 'm_end'
* setting:
return m_pg->recovery_state.is_primary();
}
+ /// is this scrub more than just regular periodic scrub?
+ [[nodiscard]] bool is_high_priority() const final;
+
void set_state_name(const char* name) final
{
m_fsm_state_name = name;
// temporary interface (to be discarded in a follow-up PR)
/// set the 'resources_failure' flag in the scrub-job object
virtual void flag_reservations_failure() = 0;
+
+ /// is this scrub more than just regular periodic scrub?
+ [[nodiscard]] virtual bool is_high_priority() const = 0;
};
});
m_next_to_request = m_sorted_secondaries.cbegin();
- // send out the 1'st request (unless we have no replicas)
- send_next_reservation_or_complete();
-
- m_slow_response_warn_timeout =
- m_scrubber.get_pg_cct()->_conf.get_val<milliseconds>(
- "osd_scrub_slow_reservation_response");
+ if (m_scrubber.is_high_priority()) {
+ // for high-priority scrubs (i.e. - user-initiated), no reservations are
+ // needed.
+ dout(10) << "high-priority scrub - no reservations needed" << dendl;
+ } else {
+ // send out the 1'st request (unless we have no replicas)
+ send_next_reservation_or_complete();
+ m_slow_response_warn_timeout =
+ m_scrubber.get_pg_cct()->_conf.get_val<milliseconds>(
+ "osd_scrub_slow_reservation_response");
+ }
}
void ReplicaReservations::release_all()