From: Radoslaw Zarzynski Date: Tue, 13 Jul 2021 16:15:14 +0000 (+0000) Subject: crimson/osd: unify the variants of PG::do_peering_event(). X-Git-Tag: v17.1.0~1407^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=faf8aca91546925fbb12bde330f2c1291809043d;p=ceph.git crimson/osd: unify the variants of PG::do_peering_event(). Simpler and more comprehensible that way. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 4d1445aa2bdc..96c9e2a41e7c 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -460,22 +460,15 @@ seastar::future<> PG::read_state(crimson::os::FuturizedStore* store) }); } -void PG::do_peering_event( - const boost::statechart::event_base &evt, - PeeringCtx &rctx) -{ - peering_state.handle_event( - evt, - &rctx); - peering_state.write_if_dirty(rctx.transaction); -} - void PG::do_peering_event( PGPeeringEvent& evt, PeeringCtx &rctx) { if (!peering_state.pg_has_reset_since(evt.get_epoch_requested())) { logger().debug("{} handling {} for pg: {}", __func__, evt.get_desc(), pgid); - do_peering_event(evt.get_event(), rctx); + peering_state.handle_event( + evt.get_event(), + &rctx); + peering_state.write_if_dirty(rctx.transaction); } else { logger().debug("{} ignoring {} -- pg has reset", __func__, evt.get_desc()); } diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index d56decf724a7..ec76f2bda57d 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -555,9 +555,6 @@ private: const hobject_t &oid, RWState::State type); - void do_peering_event( - const boost::statechart::event_base &evt, - PeeringCtx &rctx); void fill_op_params_bump_pg_version( osd_op_params_t& osd_op_p, const bool user_modify);