From: Ronen Friedman Date: Sun, 8 Sep 2024 11:28:28 +0000 (-0500) Subject: osd/scrub: remove requested_scrub_t::must_scrub X-Git-Tag: testing/wip-pdonnell-testing-20240920.212106-debug~21^2~8 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=769790122d3c5d14e18729a9608940c9401c2752;p=ceph-ci.git osd/scrub: remove requested_scrub_t::must_scrub as part of the ongoing work to remove the 'planned scrub' flag set. Signed-off-by: Ronen Friedman --- diff --git a/src/osd/scrubber/pg_scrubber.cc b/src/osd/scrubber/pg_scrubber.cc index 0176a9d59c9..fc16f2edb22 100644 --- a/src/osd/scrubber/pg_scrubber.cc +++ b/src/osd/scrubber/pg_scrubber.cc @@ -67,8 +67,6 @@ ostream& operator<<(ostream& out, const requested_scrub_t& sf) out << " planned AUTO_REPAIR"; if (sf.must_deep_scrub) out << " MUST_DEEP_SCRUB"; - if (sf.must_scrub) - out << " MUST_SCRUB"; if (sf.need_auto) out << " NEED_AUTO"; if (sf.req_scrub) @@ -646,7 +644,6 @@ scrub_level_t PgScrubber::scrub_requested( } // modifying the planned-scrub flags - to be removed shortly - req_flags.must_scrub = true; req_flags.must_deep_scrub = deep_requested; req_flags.must_repair = repair_requested; // User might intervene, so clear this @@ -2183,8 +2180,6 @@ void PgScrubber::on_mid_scrub_abort(Scrub::delay_cause_t issue) // e.g. - the 'aborted_schedule' data should be passed thru the scrubber. // In this current patchwork, for example, we are only guessing at // the original value of 'must_deep_scrub'. - m_planned_scrub.must_scrub = m_planned_scrub.must_deep_scrub || - m_planned_scrub.must_scrub; m_planned_scrub.must_repair = m_planned_scrub.must_repair || m_is_repair; m_planned_scrub.need_auto = m_planned_scrub.need_auto || m_flags.auto_repair; diff --git a/src/osd/scrubber_common.h b/src/osd/scrubber_common.h index 5e510a03a82..d2a01aa6ca3 100644 --- a/src/osd/scrubber_common.h +++ b/src/osd/scrubber_common.h @@ -299,17 +299,6 @@ struct PgScrubBeListener { * for the next scrub, and one frozen at initiation (i.e. in pg::queue_scrub()) */ struct requested_scrub_t { - - // flags to indicate explicitly requested scrubs (by admin): - // bool must_scrub, must_deep_scrub, must_repair, need_auto; - - /** - * 'must_scrub' is set by an admin command (or by need_auto). - * Affects the priority of the scrubbing, and the sleep periods - * during the scrub. - */ - bool must_scrub{false}; - /** * scrub must not be aborted. * Set for explicitly requested scrubs, and for scrubs originated by the @@ -325,7 +314,7 @@ struct requested_scrub_t { * - scrub_finish() - if can_autorepair is set, and we have errors * * If set, will prevent the OSD from casually postponing our scrub. When - * scrubbing starts, will cause must_scrub, must_deep_scrub and auto_repair to + * scrubbing starts, will cause must_deep_scrub and auto_repair to * be set. */ bool need_auto{false}; @@ -338,7 +327,7 @@ struct requested_scrub_t { bool must_deep_scrub{false}; /** - * If set, we should see must_deep_scrub & must_scrub, too + * If set, we should see must_deep_scrub, too * * - 'must_repair' is checked by the OSD when scheduling the scrubs. * - also checked & cleared at pg::queue_scrub() @@ -364,11 +353,10 @@ struct fmt::formatter { auto format(const requested_scrub_t& rs, FormatContext& ctx) const { return fmt::format_to(ctx.out(), - "(plnd:{}{}{}{}{}{})", + "(plnd:{}{}{}{}{})", rs.must_repair ? " must_repair" : "", rs.auto_repair ? " auto_repair" : "", rs.must_deep_scrub ? " must_deep_scrub" : "", - rs.must_scrub ? " must_scrub" : "", rs.need_auto ? " need_auto" : "", rs.req_scrub ? " req_scrub" : ""); }