]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scrub: fix set_last_deep_scrub_stamp()
authorRonen Friedman <rfriedma@redhat.com>
Tue, 9 Jan 2024 14:15:33 +0000 (08:15 -0600)
committerRonen Friedman <rfriedma@redhat.com>
Mon, 22 Jan 2024 14:29:25 +0000 (08:29 -0600)
The call should update last_scrub_stamp, too, without
requiring an extra call to on_scrub_schedule_input_change()

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/PG.h
src/osd/scrubber/pg_scrubber.cc

index 2a823f675969af02041c2e0c09f44a35f20b3cea..677f4e93a07954df34627a6528c52f21fcd788e8 100644 (file)
@@ -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();
index 9cd082a87947063a7d1ec420e3522da0fedffbe3..55fd7b18dcdea0e886ee30ab73a73947d41585f7 100644 (file)
@@ -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