From 0b63c850a251f75bcb7436efefe4f24480c4ed7e Mon Sep 17 00:00:00 2001 From: David Zafman Date: Wed, 17 Feb 2021 12:08:13 -0800 Subject: [PATCH] osd: Don't clear m_planned_scrub until scrub finishes successfully Fixes: https://tracker.ceph.com/issues/48984 Signed-off-by: David Zafman --- src/osd/pg_scrubber.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/pg_scrubber.cc b/src/osd/pg_scrubber.cc index 526eff86c658f..ecf2a3affc5b1 100644 --- a/src/osd/pg_scrubber.cc +++ b/src/osd/pg_scrubber.cc @@ -1141,7 +1141,6 @@ void PgScrubber::set_op_parameters(requested_scrub_t& request) // the publishing here seems to be required for tests synchronization m_pg->publish_stats_to_osd(); m_flags.deep_scrub_on_error = request.deep_scrub_on_error; - request = requested_scrub_t{}; } void PgScrubber::scrub_compare_maps() @@ -1490,6 +1489,8 @@ void PgScrubber::scrub_finish() ceph_assert(m_pg->is_locked()); + m_pg->m_planned_scrub = requested_scrub_t{}; + // if the repair request comes from auto-repair and large number of errors, // we would like to cancel auto-repair -- 2.39.5