From a2c84335b415066d5a7ea5741decfe4514bfef49 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 20 Mar 2019 16:34:58 +0800 Subject: [PATCH] crimson/osd: create msgrs in main.cc 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 --- src/crimson/osd/pg.cc | 2 +- src/crimson/osd/pg.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 6cc04c30ff4..4d6a1ca80d1 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -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)}, diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index bb7fcdfacf6..58a9e7089dd 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -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; }; -- 2.39.5