From af8939dd881aecc146dba80e1c129a2c8cc43f94 Mon Sep 17 00:00:00 2001 From: Ronen Friedman Date: Tue, 9 Jan 2024 08:15:33 -0600 Subject: [PATCH] osd/scrub: fix set_last_deep_scrub_stamp() The call should update last_scrub_stamp, too, without requiring an extra call to on_scrub_schedule_input_change() Signed-off-by: Ronen Friedman --- src/osd/PG.h | 1 + src/osd/scrubber/pg_scrubber.cc | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osd/PG.h b/src/osd/PG.h index 2a823f675969a..677f4e93a0795 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -281,6 +281,7 @@ public: recovery_state.update_stats( [t](auto &history, auto &stats) { set_last_deep_scrub_stamp(t, history, stats); + set_last_scrub_stamp(t, history, stats); return true; }); on_scrub_schedule_input_change(); diff --git a/src/osd/scrubber/pg_scrubber.cc b/src/osd/scrubber/pg_scrubber.cc index 9cd082a879470..55fd7b18dcdea 100644 --- a/src/osd/scrubber/pg_scrubber.cc +++ b/src/osd/scrubber/pg_scrubber.cc @@ -715,10 +715,11 @@ void PgScrubber::on_operator_periodic_cmd( asok_response_section(f, true, scrub_level, stamp); if (scrub_level == scrub_level_t::deep) { + // this call sets both stamps m_pg->set_last_deep_scrub_stamp(stamp); + } else { + m_pg->set_last_scrub_stamp(stamp); } - // and in both cases: - m_pg->set_last_scrub_stamp(stamp); } // when asked to force a high-priority scrub -- 2.39.5