From 9ed81f52af136cac9d8322314d862a0b68d610d1 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 16 Oct 2024 17:59:11 -0700 Subject: [PATCH] crimson: inline InternalClientRequest::do_process It's pretty short and this way all of the stage transitions are in one place. Signed-off-by: Samuel Just --- .../osd_operations/internal_client_request.cc | 52 ++++++++----------- .../osd_operations/internal_client_request.h | 2 - 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/src/crimson/osd/osd_operations/internal_client_request.cc b/src/crimson/osd/osd_operations/internal_client_request.cc index 5cf93461f7b..58f3bafe410 100644 --- a/src/crimson/osd/osd_operations/internal_client_request.cc +++ b/src/crimson/osd/osd_operations/internal_client_request.cc @@ -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 &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(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; } diff --git a/src/crimson/osd/osd_operations/internal_client_request.h b/src/crimson/osd/osd_operations/internal_client_request.h index 6023db0a8db..cc457f35412 100644 --- a/src/crimson/osd/osd_operations/internal_client_request.h +++ b/src/crimson/osd/osd_operations/internal_client_request.h @@ -45,8 +45,6 @@ private: crimson::osd::ObjectContextRef obc, std::vector &osd_ops); - seastar::future<> do_process(); - Ref pg; epoch_t start_epoch; OpInfo op_info; -- 2.39.5