]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson: inline InternalClientRequest::do_process
authorSamuel Just <sjust@redhat.com>
Thu, 17 Oct 2024 00:59:11 +0000 (17:59 -0700)
committerSamuel Just <sjust@redhat.com>
Wed, 11 Dec 2024 02:02:01 +0000 (18:02 -0800)
It's pretty short and this way all of the stage transitions are
in one place.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/osd_operations/internal_client_request.cc
src/crimson/osd/osd_operations/internal_client_request.h

index 5cf93461f7bd8991c52b2f8e1f4f0021826cb982..58f3bafe41092ee874e31916859bbb08750e6631 100644 (file)
@@ -51,33 +51,6 @@ CommonPGPipeline& InternalClientRequest::client_pp()
   return pg->request_pg_pipeline;
 }
 
-InternalClientRequest::interruptible_future<>
-InternalClientRequest::do_process(
-  crimson::osd::ObjectContextRef obc,
-  std::vector<OSDOp> &osd_ops)
-{
-  LOG_PREFIX(InternalClientRequest::do_process);
-  auto params = get_do_osd_ops_params();
-  OpsExecuter ox(
-    pg, obc, op_info, params, params.get_connection(), SnapContext{});
-  co_await pg->run_executer(
-    ox, obc, op_info, osd_ops
-  ).handle_error_interruptible(
-    crimson::ct_error::all_same_way(
-      [this, FNAME](auto e) {
-       ERRORDPPI("{}: got unexpected error {}", *pg, *this, e);
-       ceph_assert(0 == "should not return an error");
-       return interruptor::now();
-      })
-  );
-
-  auto [submitted, completed] = co_await pg->submit_executer(
-    std::move(ox), osd_ops);
-
-  co_await std::move(submitted);
-  co_await std::move(completed);
-}
-
 InternalClientRequest::interruptible_future<>
 InternalClientRequest::with_interruption()
 {
@@ -122,11 +95,28 @@ InternalClientRequest::with_interruption()
           *pg, *this, obc_manager.get_obc()->obs);
   co_await enter_stage<interruptor>(client_pp().process);
 
-  DEBUGDPP("{}: in process stage, calling do_process",
-          *pg, *this);
-  co_await do_process(obc_manager.get_obc(), osd_ops);
+  auto params = get_do_osd_ops_params();
+  OpsExecuter ox(
+    pg, obc_manager.get_obc(), op_info, params, params.get_connection(),
+    SnapContext{});
+  co_await pg->run_executer(
+    ox, obc_manager.get_obc(), op_info, osd_ops
+  ).handle_error_interruptible(
+    crimson::ct_error::all_same_way(
+      [this, FNAME](auto e) {
+       ERRORDPPI("{}: got unexpected error {}", *pg, *this, e);
+       ceph_assert(0 == "should not return an error");
+       return interruptor::now();
+      })
+  );
+
+  auto [submitted, completed] = co_await pg->submit_executer(
+    std::move(ox), osd_ops);
+
+  co_await std::move(submitted);
+  co_await std::move(completed);
 
-  logger().debug("{}: complete", *this);
+  DEBUGDPP("{}: complete", *pg, *this);
   co_await interruptor::make_interruptible(handle.complete());
   co_return;
 }
index 6023db0a8dbe2f727edbfa8fa9bf283d91295dc2..cc457f35412e70cf034c3b8762aba3e20a4e9875 100644 (file)
@@ -45,8 +45,6 @@ private:
     crimson::osd::ObjectContextRef obc,
     std::vector<OSDOp> &osd_ops);
 
-  seastar::future<> do_process();
-
   Ref<PG> pg;
   epoch_t start_epoch;
   OpInfo op_info;