Skip to content

Commit 2954608

Browse files
authored
Merge pull request ceph#60661 from ronen-fr/wip-rf-scheduledeep
osd/scrub: fix 'schedule-deepscrub' test asok command Reviewed-by: Radoslaw Zarzynski <[email protected]>
2 parents 862104b + ab49ca0 commit 2954608

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/osd/scrubber/pg_scrubber.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,13 @@ void PgScrubber::on_operator_periodic_cmd(
766766
asok_response_section(f, true, scrub_level, stamp);
767767

768768
if (scrub_level == scrub_level_t::deep) {
769+
const auto saved_shallow_stamp = m_pg->info.history.last_scrub_stamp;
769770
// this call sets both stamps
770771
m_pg->set_last_deep_scrub_stamp(stamp);
772+
// restore the shallow stamp, as otherwise it will be scheduled before
773+
// the deep, failing whatever test code called us (this is a test-only
774+
// interface).
775+
m_pg->set_last_scrub_stamp(saved_shallow_stamp);
771776
} else {
772777
m_pg->set_last_scrub_stamp(stamp);
773778
}

0 commit comments

Comments
 (0)