From: Ronen Friedman Date: Mon, 25 Mar 2024 08:37:50 +0000 (-0500) Subject: osd/scrub: discard shallow-history usage in the FSM X-Git-Tag: testing/wip-yuriw-testing-20240501.200505-squid~2^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4ffcae30b610f0974663acb2e3937d79c7391cb5;p=ceph-ci.git osd/scrub: discard shallow-history usage in the FSM Due to the complexity of the shallow-history boost::statechart, it is replaced by ReplicaActive reservation state flags. In this commit - the history code is removed. The following commits introduce the replacement. Signed-off-by: Ronen Friedman (cherry picked from commit d643bdedec7a1b747ef359bb5f6aa243a5ff3020) --- diff --git a/src/osd/scrubber/scrub_machine.cc b/src/osd/scrubber/scrub_machine.cc index 33da35cd8c8..3346a258464 100644 --- a/src/osd/scrubber/scrub_machine.cc +++ b/src/osd/scrubber/scrub_machine.cc @@ -760,8 +760,6 @@ ReplicaActive::ReplicaActive(my_context ctx) dout(10) << "-- state -->> ReplicaActive" << dendl; m_pg = scrbr->get_pg(); m_osds = m_pg->get_pg_osd(ScrubberPasskey()); - clear_shallow_history(); - clear_shallow_history(); } ReplicaActive::~ReplicaActive() @@ -1048,7 +1046,6 @@ sc::result ReplicaWaitingReservation::react(const StartReplica& ev) "reservation", scrbr->get_whoami(), scrbr->get_spgid()); context().clear_remote_reservation(true); - clear_shallow_history(); post_event(ReplicaPushesUpd{}); return transit(); } @@ -1153,7 +1150,7 @@ sc::result ReplicaActiveOp::react(const ReplicaRelease& ev) { dout(10) << "ReplicaActiveOp::react(const ReplicaRelease&)" << dendl; post_event(ev); - return transit>(); + return transit(); } @@ -1212,7 +1209,7 @@ sc::result ReplicaBuildingMap::react(const SchedReplica&) dout(10) << "replica scrub job preempted" << dendl; scrbr->send_preempted_replica(); - return transit>(); + return transit(); } // start or check progress of build_replica_map_chunk() @@ -1220,7 +1217,7 @@ sc::result ReplicaBuildingMap::react(const SchedReplica&) if (ret_init != -EINPROGRESS) { dout(10) << "ReplicaBuildingMap::react(const SchedReplica&): back to idle" << dendl; - return transit>(); + return transit(); } dout(20) << "ReplicaBuildingMap::react(const SchedReplica&): discarded" diff --git a/src/osd/scrubber/scrub_machine.h b/src/osd/scrubber/scrub_machine.h index d56059c6bf8..3810cba9a3b 100644 --- a/src/osd/scrubber/scrub_machine.h +++ b/src/osd/scrubber/scrub_machine.h @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -764,8 +763,6 @@ struct WaitDigestUpdate : sc::state, * - initial state of ReplicaActive * - No scrubbing is performed in this state, but reservation-related * events are handled. - * - uses 'shallow history', so that when returning from ReplicaActiveOp, we - * return to where we were - either reserved by our primary, or unreserved. * * - sub-states: * * ReplicaUnreserved - not reserved by a primary. In this state we @@ -937,8 +934,7 @@ struct ReplicaActive : sc::state< struct ReplicaIdle : sc::state< ReplicaIdle, ReplicaActive, - ReplicaUnreserved, - sc::has_shallow_history>, + ReplicaUnreserved>, NamedSimply { explicit ReplicaIdle(my_context ctx); ~ReplicaIdle() = default;