From: Ronen Friedman Date: Wed, 27 Mar 2024 14:37:06 +0000 (-0500) Subject: osd/scrub: ignore FullReset in all ReplicaActive states X-Git-Tag: testing/wip-yuriw-testing-20240501.200505-squid~2^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3774a79bc8f87ac59b33c5000b22a9d4ec1aa58b;p=ceph-ci.git osd/scrub: ignore FullReset in all ReplicaActive states Signed-off-by: Ronen Friedman (cherry picked from commit 4a26aa169a46a8ba916c1f8a5bb8c0c9261e11a7) --- diff --git a/src/osd/scrubber/scrub_machine.cc b/src/osd/scrubber/scrub_machine.cc index d6c8cb43028..4f0cd7b0c8e 100644 --- a/src/osd/scrubber/scrub_machine.cc +++ b/src/osd/scrubber/scrub_machine.cc @@ -940,6 +940,13 @@ sc::result ReplicaActive::react(const ReplicaRelease& ev) } +void ReplicaActive::reset_ignored(const FullReset&) +{ + dout(10) << "ReplicaActive::react(const FullReset&): FullReset ignored" + << dendl; +} + + // ---------------- ReplicaActive/ReplicaIdle --------------------------- ReplicaIdle::ReplicaIdle(my_context ctx) @@ -969,13 +976,6 @@ sc::result ReplicaIdle::react(const StartReplica& ev) } -void ReplicaIdle::reset_ignored(const FullReset&) -{ - dout(10) << "ReplicaIdle::react(const FullReset&): FullReset ignored" - << dendl; -} - - // ------------- ReplicaActive/ReplicaActiveOp -------------------------- ReplicaActiveOp::ReplicaActiveOp(my_context ctx) diff --git a/src/osd/scrubber/scrub_machine.h b/src/osd/scrubber/scrub_machine.h index 3048b006883..31625b55d43 100644 --- a/src/osd/scrubber/scrub_machine.h +++ b/src/osd/scrubber/scrub_machine.h @@ -823,11 +823,17 @@ struct ReplicaActive : sc::state, */ void clear_remote_reservation(bool warn_if_no_reservation); + void reset_ignored(const FullReset&); + using reactions = mpl::list< sc::transition, sc::custom_reaction, sc::custom_reaction, - sc::custom_reaction>; + sc::custom_reaction, + sc::in_state_reaction< + FullReset, + ReplicaActive, + &ReplicaActive::reset_ignored>>; /// handle a reservation request from a primary sc::result react(const ReplicaReserveReq& ev); @@ -904,15 +910,9 @@ struct ReplicaActive : sc::state, struct ReplicaIdle : sc::state, NamedSimply { explicit ReplicaIdle(my_context ctx); ~ReplicaIdle() = default; - void reset_ignored(const FullReset&); - using reactions = mpl::list< - sc::custom_reaction, - sc::in_state_reaction< - FullReset, - ReplicaIdle, - &ReplicaIdle::reset_ignored>>; + using reactions = mpl::list>; - sc::result react(const StartReplica& ev); + sc::result react(const StartReplica& ev); }; @@ -930,8 +930,7 @@ struct ReplicaActiveOp using reactions = mpl::list< sc::custom_reaction, sc::custom_reaction, - sc::custom_reaction, - sc::transition>; + sc::custom_reaction>; /** * Handling the unexpected (read - caused by a bug) case of receiving a