]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/osd_operations: use foreign_ptr for conn
authorSamuel Just <sjust@redhat.com>
Tue, 6 Sep 2022 23:45:32 +0000 (23:45 +0000)
committerSamuel Just <sjust@redhat.com>
Tue, 27 Sep 2022 02:35:41 +0000 (19:35 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/osd.cc
src/crimson/osd/osd_operations/client_request.h
src/crimson/osd/osd_operations/logmissing_request.h
src/crimson/osd/osd_operations/logmissing_request_reply.h
src/crimson/osd/osd_operations/peering_event.h
src/crimson/osd/osd_operations/recovery_subrequest.h
src/crimson/osd/osd_operations/replicated_request.h
src/crimson/osd/pg.cc
src/crimson/osd/pg.h

index f3a91085d13bb4a4061de429e61f1e0729a582e8..c7e9b1433de24ce007db8b034ca3cd80fb62103a 100644 (file)
@@ -1115,10 +1115,10 @@ seastar::future<> OSD::handle_rep_op_reply(crimson::net::ConnectionRef conn,
   spg_t pgid = m->get_spg();
   return pg_shard_manager.with_pg(
     pgid,
-    [conn=std::move(conn), m=std::move(m)](auto &&pg) {
+    [m=std::move(m)](auto &&pg) {
       if (pg) {
        m->finish_decode();
-       pg->handle_rep_op_reply(conn, *m);
+       pg->handle_rep_op_reply(*m);
       } else {
        logger().warn("stale reply: {}", *m);
       }
index 32a2b81fd3e5168977f433bfc229ba50c1e06cf8..fafcc5165320f9d4f926e935912734e6d15d3687 100644 (file)
@@ -29,7 +29,8 @@ class ShardServices;
 class ClientRequest final : public PhasedOperationT<ClientRequest>,
                             private CommonClientRequest {
   OSD &osd;
-  const crimson::net::ConnectionRef conn;
+  crimson::net::ConnectionFRef conn;
+
   // must be after conn due to ConnectionPipeline's life-time
   Ref<MOSDOp> m;
   OpInfo op_info;
index ba6defcd3a3c5153d09978adb1a6aac63f601487..4fae50e4f4fdd60af56316ff282a7d4b5016f689 100644 (file)
@@ -61,7 +61,7 @@ public:
 private:
   RepRequest::PGPipeline &pp(PG &pg);
 
-  crimson::net::ConnectionRef conn;
+  crimson::net::ConnectionFRef conn;
   // must be after `conn` to ensure the ConnectionPipeline's is alive
   PipelineHandle handle;
   Ref<MOSDPGUpdateLogMissing> req;
index cadec4a9acc715d115956c4e4090eda57f574a98..a3615f3c009e808f7168b380e72beaba6b382580 100644 (file)
@@ -61,7 +61,7 @@ public:
 private:
   RepRequest::PGPipeline &pp(PG &pg);
 
-  crimson::net::ConnectionRef conn;
+  crimson::net::ConnectionFRef conn;
   // must be after `conn` to ensure the ConnectionPipeline's is alive
   PipelineHandle handle;
   Ref<MOSDPGUpdateLogMissingReply> req;
index 4ccbf3f27fa4afec98744da449a584ed95ba390a..c243c04d90389fd1b2183441c6a728d900cf71a3 100644 (file)
@@ -106,7 +106,7 @@ public:
 
 class RemotePeeringEvent : public PeeringEvent<RemotePeeringEvent> {
 protected:
-  crimson::net::ConnectionRef conn;
+  crimson::net::ConnectionFRef conn;
   // must be after conn due to ConnectionPipeline's life-time
   PipelineHandle handle;
 
index e629b055faade865e67a784f473c0b07529674ea..f1c0bc775e6a3c097855b3ee85f1d7563fb5b147 100644 (file)
@@ -55,7 +55,7 @@ public:
   > tracking_events;
 
 private:
-  crimson::net::ConnectionRef conn;
+  crimson::net::ConnectionFRef conn;
   // must be after `conn` to ensure the ConnectionPipeline's is alive
   PipelineHandle handle;
   Ref<MOSDFastDispatchOp> m;
index 33ea8a86ca129bb58cf4ee9af4f1610abe719573..b04ee0f9388556dc252f45486892d8314a9f8775 100644 (file)
@@ -60,7 +60,7 @@ public:
 private:
   PGPipeline &pp(PG &pg);
 
-  crimson::net::ConnectionRef conn;
+  crimson::net::ConnectionFRef conn;
   PipelineHandle handle;
   Ref<MOSDRepOp> req;
 };
index bd22756fdf59d0b5aefbf1aa1979607921085149..759ae2e3f989ed1acedcc99ce5ba208eb17757f5 100644 (file)
@@ -1256,8 +1256,7 @@ PG::interruptible_future<> PG::handle_rep_op(Ref<MOSDRepOp> req)
     });
 }
 
-void PG::handle_rep_op_reply(crimson::net::ConnectionRef conn,
-                            const MOSDRepOpReply& m)
+void PG::handle_rep_op_reply(const MOSDRepOpReply& m)
 {
   if (!can_discard_replica_op(m)) {
     backend->got_rep_op_reply(m);
index 98e2d2103bc26235daaeb83624f2ab0f0ee4df02..174a64183a7a88cc07179ff6bd2f2a01cf11ef97 100644 (file)
@@ -554,8 +554,7 @@ public:
     with_obc_func_t&& f);
 
   interruptible_future<> handle_rep_op(Ref<MOSDRepOp> m);
-  void handle_rep_op_reply(crimson::net::ConnectionRef conn,
-                          const MOSDRepOpReply& m);
+  void handle_rep_op_reply(const MOSDRepOpReply& m);
   interruptible_future<> do_update_log_missing(Ref<MOSDPGUpdateLogMissing> m);
   interruptible_future<> do_update_log_missing_reply(
                          Ref<MOSDPGUpdateLogMissingReply> m);