]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/scrub: remove requested_scrub_t::must_repair
authorRonen Friedman <rfriedma@redhat.com>
Mon, 9 Sep 2024 14:28:07 +0000 (09:28 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Mon, 9 Sep 2024 14:28:07 +0000 (09:28 -0500)
as part of the ongoing work to remove the 'planned scrub'
flag set.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/pg_scrubber.cc
src/osd/scrubber_common.h

index 442f55dbefd223137dd17dafc079c5890f1272d2..408089bba3013b54d997e2563d6b5a6bc5bc0eae 100644 (file)
@@ -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")
index 255a9315c1651545534822eab3e467e2db95f1b9..657b41300938487e0bd256019455546726e2731c 100644 (file)
@@ -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<requested_scrub_t> {
   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" : "");