]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: Use crimson::net::make_message() in ShardServices
authorAmnon Hanuhov <ahanukov@redhat.com>
Tue, 27 Apr 2021 09:33:30 +0000 (12:33 +0300)
committerAmnon Hanuhov <ahanukov@redhat.com>
Thu, 6 May 2021 17:22:06 +0000 (20:22 +0300)
Signed-off-by: Amnon Hanuhov <ahanukov@redhat.com>
src/crimson/osd/shard_services.cc

index f08debae592db56d4c91ccf7ee473a0c8a27a1fd..9ae11f7132f14bb28f0d38873347591afef07ad8 100644 (file)
@@ -188,11 +188,11 @@ seastar::future<> ShardServices::send_pg_temp()
   if (pg_temp_wanted.empty())
     return seastar::now();
   logger().debug("{}: {}", __func__, pg_temp_wanted);
-  boost::intrusive_ptr<MOSDPGTemp> ms[2] = {nullptr, nullptr};
+  MURef<MOSDPGTemp> ms[2] = {nullptr, nullptr};
   for (auto& [pgid, pg_temp] : pg_temp_wanted) {
     auto& m = ms[pg_temp.forced];
     if (!m) {
-      m = make_message<MOSDPGTemp>(osdmap->get_epoch());
+      m = crimson::net::make_message<MOSDPGTemp>(osdmap->get_epoch());
       m->forced = pg_temp.forced;
     }
     m->pg_temp.emplace(pgid, pg_temp.acting);
@@ -200,9 +200,9 @@ seastar::future<> ShardServices::send_pg_temp()
   pg_temp_pending.merge(pg_temp_wanted);
   pg_temp_wanted.clear();
   return seastar::parallel_for_each(std::begin(ms), std::end(ms),
-    [this](auto m) {
+    [this](auto& m) {
       if (m) {
-       return monc.send_message(m);
+       return monc.send_message(std::move(m));
       } else {
        return seastar::now();
       }
@@ -225,7 +225,7 @@ seastar::future<> ShardServices::send_pg_created(pg_t pgid)
   auto o = get_osdmap();
   ceph_assert(o->require_osd_release >= ceph_release_t::luminous);
   pg_created.insert(pgid);
-  return monc.send_message(make_message<MOSDPGCreated>(pgid));
+  return monc.send_message(crimson::net::make_message<MOSDPGCreated>(pgid));
 }
 
 seastar::future<> ShardServices::send_pg_created()
@@ -235,7 +235,7 @@ seastar::future<> ShardServices::send_pg_created()
   ceph_assert(o->require_osd_release >= ceph_release_t::luminous);
   return seastar::parallel_for_each(pg_created,
     [this](auto &pgid) {
-      return monc.send_message(make_message<MOSDPGCreated>(pgid));
+      return monc.send_message(crimson::net::make_message<MOSDPGCreated>(pgid));
     });
 }
 
@@ -298,7 +298,7 @@ seastar::future<> ShardServices::send_alive(const epoch_t want)
         up_thru_wanted > up_thru) {
     logger().debug("{} up_thru_wanted={} up_thru={}", __func__, want, up_thru);
     return monc.send_message(
-      make_message<MOSDAlive>(osdmap->get_epoch(), want));
+      crimson::net::make_message<MOSDAlive>(osdmap->get_epoch(), want));
   } else {
     logger().debug("{} {} <= {}", __func__, want, osdmap->get_up_thru(whoami));
     return seastar::now();