]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: create msgrs in main.cc
authorKefu Chai <kchai@redhat.com>
Wed, 20 Mar 2019 08:34:58 +0000 (16:34 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 20 Mar 2019 09:33:14 +0000 (17:33 +0800)
update PG to hold references of messengers instead of pointers to them,
as their lifecycle will be managed in main.cc

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/pg.cc
src/crimson/osd/pg.h

index 6cc04c30ff44e81de70fd7670f144ad25364289d..4d6a1ca80d132567c07fbc7003cf3bc5265daf33 100644 (file)
@@ -12,7 +12,7 @@ PG::PG(spg_t pgid,
        std::string&& name,
        ec_profile_t&& ec_profile,
        cached_map_t osdmap,
-       ceph::net::Messenger* msgr)
+       ceph::net::Messenger& msgr)
   : pgid{pgid},
     whoami{pg_shard},
     pool{std::move(pool)},
index bb7fcdfacf6006603ac7979356fe0ea09bda08e3..58a9e7089dd47476f3663f2cea366dee2442ce5c 100644 (file)
@@ -35,7 +35,7 @@ public:
      std::string&& name,
      ec_profile_t&& ec_profile,
      cached_map_t osdmap,
-     ceph::net::Messenger* msgr);
+     ceph::net::Messenger& msgr);
 
   epoch_t get_osdmap_epoch() const;
   const pg_info_t& get_info() const;
@@ -67,5 +67,5 @@ private:
   pg_shard_set_t actingset, upset;
 
   cached_map_t osdmap;
-  ceph::net::Messenger* msgr = nullptr;
+  ceph::net::Messenger& msgr;
 };