]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/scrub: remove requested_scrub_t::must_scrub
authorRonen Friedman <rfriedma@redhat.com>
Sun, 8 Sep 2024 11:28:28 +0000 (06:28 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Mon, 9 Sep 2024 06:43:42 +0000 (01:43 -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 0176a9d59c92ef01e887db977fcc5fe4cc02bd33..fc16f2edb22ecd5fca2e1969371e611c6c694bcd 100644 (file)
@@ -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;
 
index 5e510a03a82ef86947879a1cc4f355d24f6e1660..d2a01aa6ca30244cc2ad810aaebc8527fb5b49e0 100644 (file)
@@ -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<requested_scrub_t> {
   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" : "");
   }