]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: unify the variants of PG::do_peering_event().
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 13 Jul 2021 16:15:14 +0000 (16:15 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 13 Jul 2021 16:18:38 +0000 (16:18 +0000)
Simpler and more comprehensible that way.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/pg.cc
src/crimson/osd/pg.h

index 4d1445aa2bdca4fc93c829880afc48e0f4649e45..96c9e2a41e7c46093e814ee3324908b83afe1024 100644 (file)
@@ -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());
   }
index d56decf724a7b7e9d2481428015010ef9fa4f106..ec76f2bda57d618344ad2d2c361fa59898cd2961 100644 (file)
@@ -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);