]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/.../client_request: convert ClientRequest::process_pg_op to coroutine
authorSamuel Just <sjust@redhat.com>
Wed, 7 Feb 2024 00:32:38 +0000 (00:32 +0000)
committerSamuel Just <sjust@redhat.com>
Mon, 1 Apr 2024 23:11:32 +0000 (16:11 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/osd_operations/client_request.cc

index a3c895d9654107e89265e741ec81641774bfbe52..0574a1bcfe5e29deb54b8128b38ed6c6b2606333 100644 (file)
@@ -203,12 +203,10 @@ ClientRequest::interruptible_future<>
 ClientRequest::process_pg_op(
   Ref<PG> pg)
 {
-  return pg->do_pg_ops(
-    m
-  ).then_interruptible([this, pg=std::move(pg)](MURef<MOSDOpReply> 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>& pg, int err)