From: Radoslaw Zarzynski Date: Thu, 9 May 2024 17:37:51 +0000 (+0000) Subject: crimson/osd: settle ECRecoveryBackend -- local MOSDPGPush X-Git-Tag: v21.0.0~3^2~42 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c9e1a93bee2d3b61fff960e3e67ad9cd1c600a8b;p=ceph.git crimson/osd: settle ECRecoveryBackend -- local MOSDPGPush Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/osd/ec_recovery_backend.h b/src/crimson/osd/ec_recovery_backend.h index 9ca33111b299..66fdd67deaf1 100644 --- a/src/crimson/osd/ec_recovery_backend.h +++ b/src/crimson/osd/ec_recovery_backend.h @@ -49,6 +49,9 @@ public: return seastar::now(); } + interruptible_future<> handle_push( + Ref m); + private: void commit_txn_send_replies( ceph::os::Transaction&& txn, @@ -58,8 +61,6 @@ private: const std::map>& raw_attrs, RecoveryOp &op) final; - interruptible_future<> handle_push( - Ref m); interruptible_future<> handle_push_reply( Ref m); }; diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index e1e7100ed44f..4343c3812286 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -1930,4 +1930,18 @@ bool PG::check_in_progress_op( reqid, version, user_version, return_code, op_returns)); } +void PG::send_message_osd_cluster(int osd, MOSDPGPush* msg, epoch_t from_epoch) +{ + logger().debug("{}: MOSDPGPush from_epoch {} to osd.{}", + __func__, from_epoch, osd); + if (whoami_shard().osd == osd) { + static_cast(*recovery_backend).handle_push(msg); + } else { + std::vector wrapped_msg { + std::make_pair(osd, static_cast(msg)) + }; + send_message_osd_cluster(wrapped_msg, from_epoch); + } +} + } diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index daf0e3595095..c5a92ed3306f 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -159,6 +159,8 @@ public: }); }); } + void send_message_osd_cluster( + int osd, MOSDPGPush* msg, epoch_t from_epoch) override; std::ostream& gen_dbg_prefix(std::ostream& out) const override final { return gen_prefix(out); }