Skip to content

Commit af8939d

Browse files
committed
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 <[email protected]>
1 parent d294ea8 commit af8939d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/osd/PG.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ class PG : public DoutPrefixProvider,
281281
recovery_state.update_stats(
282282
[t](auto &history, auto &stats) {
283283
set_last_deep_scrub_stamp(t, history, stats);
284+
set_last_scrub_stamp(t, history, stats);
284285
return true;
285286
});
286287
on_scrub_schedule_input_change();

src/osd/scrubber/pg_scrubber.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,10 +715,11 @@ void PgScrubber::on_operator_periodic_cmd(
715715
asok_response_section(f, true, scrub_level, stamp);
716716

717717
if (scrub_level == scrub_level_t::deep) {
718+
// this call sets both stamps
718719
m_pg->set_last_deep_scrub_stamp(stamp);
720+
} else {
721+
m_pg->set_last_scrub_stamp(stamp);
719722
}
720-
// and in both cases:
721-
m_pg->set_last_scrub_stamp(stamp);
722723
}
723724

724725
// when asked to force a high-priority scrub

0 commit comments

Comments
 (0)