From: Alex Ainscow Date: Fri, 3 Oct 2025 13:55:56 +0000 (+0100) Subject: osdc: Interface to submit IO with ASIO Post. X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c3f6bfb507109d015752f91bed93b68bbf862316;p=ceph.git osdc: Interface to submit IO with ASIO Post. For direct read failures, the locking is such that we cannot immediately send a new IO without deadlocking. This new interface allows an op to be sent as an asio post. Signed-off-by: Alex Ainscow --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index bf3c626aa24..ee5018cdca1 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -2337,6 +2337,13 @@ void Objecter::resend_mon_ops() // read | write --------------------------- + +void Objecter::op_post_submit(Op* op) { + boost::asio::post(service, [this, op]() { + op_submit(op); + }); +} + void Objecter::op_submit(Op *op, ceph_tid_t *ptid, int *ctx_budget) { shunique_lock rl(rwlock, ceph::acquire_shared); diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index e8e24e87a94..4a72662e0c7 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -2808,6 +2808,7 @@ private: int *ctx_budget = NULL); // public interface public: + void op_post_submit(Op *op); void op_submit(Op *op, ceph_tid_t *ptid = NULL, int *ctx_budget = NULL); bool is_active() { std::shared_lock l(rwlock);