From 12e5f2289d3445f7f39320a5e63342e09a779b99 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 9 Oct 2023 15:12:29 -0700 Subject: [PATCH] crimson/osd/pg: PG::scrub_requested isn't actually used in crimson Crimson routes the scrub request directly to the PGScrubber rather than going through PeeringState. Signed-off-by: Samuel Just --- src/crimson/osd/pg.cc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 6537eed2b7d5..5e3b0d429414 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -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) { -- 2.47.3