From 4ccbc083e2976583ba29e156be66b54c13d258fe Mon Sep 17 00:00:00 2001 From: Ronen Friedman Date: Mon, 9 Sep 2024 09:28:07 -0500 Subject: [PATCH] osd/scrub: remove requested_scrub_t::must_repair as part of the ongoing work to remove the 'planned scrub' flag set. Signed-off-by: Ronen Friedman --- src/osd/scrubber/pg_scrubber.cc | 7 +++---- src/osd/scrubber_common.h | 9 +-------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/osd/scrubber/pg_scrubber.cc b/src/osd/scrubber/pg_scrubber.cc index 442f55dbefd..408089bba30 100644 --- a/src/osd/scrubber/pg_scrubber.cc +++ b/src/osd/scrubber/pg_scrubber.cc @@ -61,8 +61,6 @@ ostream& operator<<(ostream& out, const scrub_flags_t& sf) ostream& operator<<(ostream& out, const requested_scrub_t& sf) { - if (sf.must_repair) - out << " MUST_REPAIR"; if (sf.auto_repair) out << " planned AUTO_REPAIR"; if (sf.need_auto) @@ -642,7 +640,6 @@ scrub_level_t PgScrubber::scrub_requested( } // modifying the planned-scrub flags - to be removed shortly - req_flags.must_repair = repair_requested; // User might intervene, so clear this req_flags.need_auto = false; req_flags.req_scrub = true; @@ -2428,7 +2425,9 @@ void PgScrubber::dump_scrubber( f->dump_bool("must_scrub", earliest.is_high_priority()); f->dump_bool( "must_deep_scrub", m_scrub_job->deep_target.is_high_priority()); - f->dump_bool("must_repair", request_flags.must_repair); + // the following data item is deprecated. Will be replaced by a set + // of reported attributes that match the updated scrub-job state. + f->dump_bool("must_repair", earliest.urgency() == urgency_t::must_repair); f->dump_bool("need_auto", request_flags.need_auto); f->dump_stream("scrub_reg_stamp") diff --git a/src/osd/scrubber_common.h b/src/osd/scrubber_common.h index 255a9315c16..657b4130093 100644 --- a/src/osd/scrubber_common.h +++ b/src/osd/scrubber_common.h @@ -318,12 +318,6 @@ struct requested_scrub_t { */ bool need_auto{false}; - /** - * - 'must_repair' is checked by the OSD when scheduling the scrubs. - * - also checked & cleared at pg::queue_scrub() - */ - bool must_repair{false}; - /* * the value of auto_repair is determined in sched_scrub() (once per scrub. * previous value is not remembered). Set if @@ -343,8 +337,7 @@ struct fmt::formatter { auto format(const requested_scrub_t& rs, FormatContext& ctx) const { return fmt::format_to(ctx.out(), - "(plnd:{}{}{}{})", - rs.must_repair ? " must_repair" : "", + "(plnd:{}{}{})", rs.auto_repair ? " auto_repair" : "", rs.need_auto ? " need_auto" : "", rs.req_scrub ? " req_scrub" : ""); -- 2.39.5