]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Don't clear m_planned_scrub until scrub finishes successfully 39535/head
authorDavid Zafman <dzafman@redhat.com>
Wed, 17 Feb 2021 20:08:13 +0000 (12:08 -0800)
committerDavid Zafman <dzafman@redhat.com>
Wed, 17 Feb 2021 20:19:31 +0000 (12:19 -0800)
Fixes: https://tracker.ceph.com/issues/48984
Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/pg_scrubber.cc

index 526eff86c658fa32c7f3c4eeb7db5aacc42a38e5..ecf2a3affc5b15cee208846075db02c6ba4eaaf2 100644 (file)
@@ -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