]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg: PG::scrub_requested isn't actually used in crimson 54214/head
authorSamuel Just <sjust@redhat.com>
Mon, 9 Oct 2023 22:12:29 +0000 (15:12 -0700)
committerSamuel Just <sjust@redhat.com>
Mon, 11 Dec 2023 04:25:43 +0000 (20:25 -0800)
Crimson routes the scrub request directly to the PGScrubber rather
than going through PeeringState.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/pg.cc

index 6537eed2b7d534f240d3bff6c6a8cb9d7decd727..5e3b0d429414afb3102b19c57d5ad4ed45c802f4 100644 (file)
@@ -547,19 +547,10 @@ void PG::on_active_advmap(const OSDMapRef &osdmap)
 
 void PG::scrub_requested(scrub_level_t scrub_level, scrub_type_t scrub_type)
 {
-  // TODO: should update the stats upon finishing the scrub
-  peering_state.update_stats([scrub_level, this](auto& history, auto& stats) {
-    const utime_t now = ceph_clock_now();
-    history.last_scrub = peering_state.get_info().last_update;
-    history.last_scrub_stamp = now;
-    history.last_clean_scrub_stamp = now;
-    if (scrub_level == scrub_level_t::deep) {
-      history.last_deep_scrub = history.last_scrub;
-      history.last_deep_scrub_stamp = now;
-    }
-    // yes, please publish the stats
-    return true;
-  });
+  /* We don't actually route the scrub request message into the state machine.
+   * Instead, we handle it directly in PGScrubber::handle_scrub_requested).
+   */
+  ceph_assert(0 == "impossible in crimson");
 }
 
 void PG::log_state_enter(const char *state) {