From 0de3613072659cfdcb41ea7b1df5865425774b3b Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 7 Feb 2024 00:32:38 +0000 Subject: [PATCH] crimson/.../client_request: convert ClientRequest::process_pg_op to coroutine Signed-off-by: Samuel Just --- src/crimson/osd/osd_operations/client_request.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/crimson/osd/osd_operations/client_request.cc b/src/crimson/osd/osd_operations/client_request.cc index a3c895d965410..0574a1bcfe5e2 100644 --- a/src/crimson/osd/osd_operations/client_request.cc +++ b/src/crimson/osd/osd_operations/client_request.cc @@ -203,12 +203,10 @@ ClientRequest::interruptible_future<> ClientRequest::process_pg_op( Ref pg) { - return pg->do_pg_ops( - m - ).then_interruptible([this, pg=std::move(pg)](MURef reply) { - // TODO: gate the crosscore sending - return get_foreign_connection().send_with_throttling(std::move(reply)); - }); + auto reply = co_await pg->do_pg_ops(m); + // TODO: gate the crosscore sending + co_await interruptor::make_interruptible( + get_foreign_connection().send_with_throttling(std::move(reply))); } auto ClientRequest::reply_op_error(const Ref& pg, int err) -- 2.39.5