]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/scrub: decoupling the FSM from the scrubber 62557/head
authorRonen Friedman <rfriedma@redhat.com>
Fri, 28 Mar 2025 16:16:52 +0000 (11:16 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Tue, 1 Apr 2025 04:37:35 +0000 (23:37 -0500)
commiteb22a6ff352571474cb8012782dfa6067cde07e6
tree35634053aaf0382ad5132b04eac7043f7a8012ca
parent345911ef2ba65f7f277dd6c33016d86a33539134
osd/scrub: decoupling the FSM from the scrubber

The scrubber FSM has always been accessing the PgScrubber
object via an abstract interface (ScrubMachineListener).
But the reverse was not true: the PgScrubber owned a unique_ptr
directly to an instance of Scrubber::ScrubMachine.

This PR introduces a new interface, ScrubFsmIf, that is
implemented by the ScrubMachine. This simplifies
unit-testing the PgScrubber, as we can now inject a mock
implementation of the FSM interface.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/pg_scrubber.h
src/osd/scrubber/scrub_machine.h
src/osd/scrubber/scrub_machine_if.h [new file with mode: 0644]