From da3221bf482b541f322e9ee006a6534a8243e4e2 Mon Sep 17 00:00:00 2001 From: Amnon Hanuhov Date: Tue, 18 May 2021 13:37:09 +0300 Subject: [PATCH] osd: Overload send_cluster_message() in PeeringState One for crimson-osd taking std::unique_ptr and one for ceph-osd taking boost::intrusive_ptr Signed-off-by: Amnon Hanuhov --- src/crimson/osd/pg.h | 4 ++-- src/osd/PeeringState.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index ad42c4252f8..8763b6b9c64 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -164,9 +164,9 @@ public: } void send_cluster_message( - int osd, MessageRef m, + int osd, MessageURef m, epoch_t epoch, bool share_map_update=false) final { - (void)shard_services.send_to_osd(osd, m, epoch); + (void)shard_services.send_to_osd(osd, std::move(m), epoch); } void send_pg_created(pg_t pgid) final { diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index d8615ec5d07..ed8a0fe2e05 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -265,8 +265,13 @@ public: virtual uint64_t get_snap_trimq_size() const = 0; /// Send cluster message to osd + #if defined(WITH_SEASTAR) + virtual void send_cluster_message( + int osd, MessageURef m, epoch_t epoch, bool share_map_update=false) = 0; + #else virtual void send_cluster_message( int osd, MessageRef m, epoch_t epoch, bool share_map_update=false) = 0; + #endif /// Send pg_created to mon virtual void send_pg_created(pg_t pgid) = 0; -- 2.39.5