]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scrub: remove the 'has_deep_errors' scheduling flag 60863/head
authorRonen Friedman <rfriedma@redhat.com>
Wed, 27 Nov 2024 18:34:53 +0000 (12:34 -0600)
committerRonen Friedman <rfriedma@redhat.com>
Wed, 27 Nov 2024 18:34:53 +0000 (12:34 -0600)
Following https://github.com/ceph/ceph/pull/59942
("osd/scrub: separate shallow vs deep errors storage"),
the ScrubStore now holds two separate error databases,
one for the shallow errors and one for the deep errors.

There is no longer a need to prevent (or warn about)
shallow scrubs being performed when deep errors are present.

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

index 307651fd6272911b4057bb6b09eff53e57a520e4..cd7cad777bc30c732c3cf6ccaedf2f457d4ecfe2 100644 (file)
@@ -1278,7 +1278,6 @@ Scrub::schedule_result_t PG::start_scrubbing(
   pg_cond.allow_deep =
       !(get_osdmap()->test_flag(CEPH_OSDMAP_NODEEP_SCRUB) ||
        pool.info.has_flag(pg_pool_t::FLAG_NODEEP_SCRUB));
-  pg_cond.has_deep_errors = (info.stats.stats.sum.num_deep_scrub_errors > 0);
   pg_cond.can_autorepair =
       (cct->_conf->osd_scrub_auto_repair &&
        get_pgbackend()->auto_repair_supported());
index aa53df5ae8a12e445c42ed503b87d08cfeef56bf..fea8c7570401b63c16315c7d0ac5c13dccec4317 100644 (file)
@@ -2299,26 +2299,6 @@ Scrub::schedule_result_t PgScrubber::start_scrub_session(
     }
   }
 
-  // restricting shallow scrubs of PGs that have deep errors:
-  if (pg_cond.has_deep_errors && trgt.is_shallow()) {
-    if (trgt.urgency() < urgency_t::operator_requested) {
-      // if there are deep errors, we should have scheduled a deep scrub first.
-      // If we are here trying to perform a shallow scrub, it means that for some
-      // reason that deep scrub failed to be initiated. We will not try a shallow
-      // scrub until this is solved.
-      dout(10) << __func__ << ": Regular scrub skipped due to deep-scrub errors"
-              << dendl;
-      requeue_penalized(
-         s_or_d, delay_both_targets_t::no, delay_cause_t::pg_state, clock_now);
-      return schedule_result_t::target_specific_failure;
-    } else {
-      // we will honor the request anyway, but will report the issue
-      m_osds->clog->error() << fmt::format(
-         "osd.{} pg {} Regular scrub request, deep-scrub details will be lost",
-         m_osds->whoami, m_pg_id);
-    }
-  }
-
   // if only explicitly requested repairing is allowed - skip other types
   // of scrubbing
   if (osd_restrictions.allow_requested_repair_only &&
index 809107e593bba01f19eec3c810927ad4eb62b034..2ab5570a71519f4f475e751d6393a940a9b2c265 100644 (file)
@@ -109,7 +109,6 @@ static_assert(sizeof(Scrub::OSDRestrictions) <= sizeof(uint32_t));
 struct ScrubPGPreconds {
   bool allow_shallow{true};
   bool allow_deep{true};
-  bool has_deep_errors{false};
   bool can_autorepair{false};
 };
 static_assert(sizeof(Scrub::ScrubPGPreconds) <= sizeof(uint32_t));
@@ -181,9 +180,8 @@ struct formatter<Scrub::ScrubPGPreconds> {
   auto format(const Scrub::ScrubPGPreconds& conds, FormatContext& ctx) const
   {
     return fmt::format_to(
-       ctx.out(), "allowed(shallow/deep):{:1}/{:1},deep-err:{:1},can-autorepair:{:1}",
-       conds.allow_shallow, conds.allow_deep, conds.has_deep_errors,
-       conds.can_autorepair);
+       ctx.out(), "allowed(shallow/deep):{:1}/{:1},can-autorepair:{:1}",
+       conds.allow_shallow, conds.allow_deep, conds.can_autorepair);
   }
 };