From: Kefu Chai Date: Wed, 20 Mar 2019 08:34:58 +0000 (+0800) Subject: crimson/osd: create msgrs in main.cc X-Git-Tag: v15.0.0~184^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a2c84335b415066d5a7ea5741decfe4514bfef49;p=ceph.git 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 --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 6cc04c30ff44..4d6a1ca80d13 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 bb7fcdfacf60..58a9e7089dd4 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; };