]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/scrub: decouple being reserved from handling scrub requests
authorRonen Friedman <rfriedma@redhat.com>
Mon, 13 Nov 2023 07:09:45 +0000 (01:09 -0600)
committerRonen Friedman <rfriedma@redhat.com>
Thu, 30 Nov 2023 11:40:27 +0000 (05:40 -0600)
commite65ded632888bd07daf5189b210934a872026116
tree3b2a8dbddf1ae101525eab3b21eab4109c664328
parent601c4b5a310a687f8e979a41c28dd33affa05479
osd/scrub: decouple being reserved from handling scrub requests

For a replica, following this change:

* 'ReplicaActive' captures the state of the scrubber when
  acting as a replica, from peering to interval change;

* "being reserved" is just a flag maintained by ReplicaActive, and
  is no longer a prerequisite for handling scrub requests.

* each scrub request is now associated with its own 'token' value.

and the following minor simplification:

* the 'should we wait for pushes' decision is now part of the
  code executed on the transition from ReplicaIdle into ReplicaActiveOp.
  StartReplicaNoWait can now be discarded.

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