out << " MUST_DEEP_SCRUB";
if (sf.must_scrub)
out << " MUST_SCRUB";
- if (sf.time_for_deep)
- out << " TIME_FOR_DEEP";
if (sf.need_auto)
out << " NEED_AUTO";
if (sf.req_scrub)
state_set(PG_STATE_SCRUBBING);
// will we be deep-scrubbing?
- if (request.calculated_to_deep) {
+ m_is_deep = m_active_target->sched_info.level == scrub_level_t::deep;
+ if (m_is_deep) {
state_set(PG_STATE_DEEP_SCRUB);
- m_is_deep = true;
} else {
- m_is_deep = false;
-
- // make sure we got the 'calculated_to_deep' flag right
ceph_assert(!request.must_deep_scrub);
ceph_assert(!request.need_auto);
}
return schedule_result_t::osd_wide_failure;
}
- // can commit to the updated flags now, as nothing will stop the scrub
- //m_planned_scrub = *updated_flags;
+ // can commit now to the specific scrub details, as nothing will
+ // stop the scrub
// An interrupted recovery repair could leave this set.
state_clear(PG_STATE_REPAIR);
{
f->open_object_section("scrubber");
- if (m_active) { // TBD replace with PR#42780's test
+ if (m_active_target) {
f->dump_bool("active", true);
dump_active_scrubber(f, state_test(PG_STATE_DEEP_SCRUB));
} else {
*/
bool must_deep_scrub{false};
- /**
- * (An intermediary flag used by pg::sched_scrub() on the first time
- * a planned scrub has all its resources). Determines whether the next
- * repair/scrub will be 'deep'.
- *
- * Note: 'dumped' by PgScrubber::dump() and such. In reality, being a
- * temporary that is set and reset by the same operation, will never
- * appear externally to be set
- */
- bool time_for_deep{false};
-
bool deep_scrub_on_error{false};
/**
* the value of auto_repair is determined in sched_scrub() (once per scrub.
* previous value is not remembered). Set if
* - allowed by configuration and backend, and
- * - for periodic scrubs: time_for_deep was just set
+ * - for periodic scrubs: time_for_deep was just set RRR
*/
bool auto_repair{false};
-
- /**
- * Used to indicate, both in client-facing listings and internally, that
- * the planned scrub will be a deep one.
- */
- bool calculated_to_deep{false};
};
std::ostream& operator<<(std::ostream& out, const requested_scrub_t& sf);
auto format(const requested_scrub_t& rs, FormatContext& ctx)
{
return fmt::format_to(ctx.out(),
- "(plnd:{}{}{}{}{}{}{}{}{})",
+ "(plnd:{}{}{}{}{}{}{})",
rs.must_repair ? " must_repair" : "",
rs.auto_repair ? " auto_repair" : "",
rs.deep_scrub_on_error ? " deep_scrub_on_error" : "",
rs.must_deep_scrub ? " must_deep_scrub" : "",
rs.must_scrub ? " must_scrub" : "",
- rs.time_for_deep ? " time_for_deep" : "",
rs.need_auto ? " need_auto" : "",
- rs.req_scrub ? " req_scrub" : "",
- rs.calculated_to_deep ? " deep" : "");
+ rs.req_scrub ? " req_scrub" : "");
}
};