From: Radosław Zarzyński Date: Tue, 19 Apr 2022 15:32:40 +0000 (+0200) Subject: crimson/osd: migrate InternalClientRequest to new tracking infra. X-Git-Tag: v18.0.0~947^2~14 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=69e465b2cf181a28da7d771bfc6997c97ea4d772;p=ceph-ci.git crimson/osd: migrate InternalClientRequest to new tracking infra. Signed-off-by: Radosław Zarzyński --- diff --git a/src/crimson/osd/osd_operations/internal_client_request.cc b/src/crimson/osd/osd_operations/internal_client_request.cc index b4b61ea66f6..cf887f351aa 100644 --- a/src/crimson/osd/osd_operations/internal_client_request.cc +++ b/src/crimson/osd/osd_operations/internal_client_request.cc @@ -11,6 +11,16 @@ namespace { } } +namespace crimson { + template <> + struct EventBackendRegistry { + static std::tuple<> get_backends() { + return {}; + } + }; +} + + namespace crimson::osd { InternalClientRequest::InternalClientRequest(Ref pg) @@ -39,23 +49,26 @@ CommonPGPipeline& InternalClientRequest::pp() seastar::future<> InternalClientRequest::start() { + track_event(); return crimson::common::handle_system_shutdown([this] { return seastar::repeat([this] { logger().debug("{}: in repeat", *this); return interruptor::with_interruption([this]() mutable { - return with_blocking_future_interruptible( - handle.enter(pp().wait_for_active) + return enter_stage( + pp().wait_for_active ).then_interruptible([this] { - return with_blocking_future_interruptible( - pg->wait_for_active_blocker.wait()); + return with_blocking_event([this] (auto&& trigger) { + return pg->wait_for_active_blocker.wait(std::move(trigger)); + }); }).then_interruptible([this] { - return with_blocking_future_interruptible( - handle.enter(pp().recover_missing) + return enter_stage( + pp().recover_missing ).then_interruptible([this] { return do_recover_missing(pg, get_target_oid()); }).then_interruptible([this] { - return with_blocking_future_interruptible( - handle.enter(pp().get_obc) + return enter_stage( + pp().get_obc ).then_interruptible([this] () -> PG::load_obc_iertr::future<> { logger().debug("{}: getting obc lock", *this); return seastar::do_with(create_osd_ops(), @@ -67,9 +80,7 @@ seastar::future<> InternalClientRequest::start() assert(ret == 0); return pg->with_locked_obc(get_target_oid(), op_info, [&osd_ops, this](auto obc) { - return with_blocking_future_interruptible( - handle.enter(pp().process) - ).then_interruptible( + return enter_stage(pp().process).then_interruptible( [obc=std::move(obc), &osd_ops, this] { return pg->do_osd_ops( std::move(obc), @@ -109,6 +120,8 @@ seastar::future<> InternalClientRequest::start() return seastar::stop_iteration::no; } }, pg); + }).then([this] { + track_event(); }); }); } diff --git a/src/crimson/osd/osd_operations/internal_client_request.h b/src/crimson/osd/osd_operations/internal_client_request.h index a1b538c729e..6ad77121df0 100644 --- a/src/crimson/osd/osd_operations/internal_client_request.h +++ b/src/crimson/osd/osd_operations/internal_client_request.h @@ -6,7 +6,9 @@ #include "crimson/common/type_helpers.h" #include "crimson/osd/osd_operation.h" #include "crimson/osd/osd_operations/client_request_common.h" +#include "crimson/osd/osd_operations/common/pg_pipeline.h" #include "crimson/osd/pg.h" +#include "crimson/osd/pg_activation_blocker.h" namespace crimson::osd { @@ -43,6 +45,17 @@ private: Ref pg; OpInfo op_info; + +public: + std::tuple< + StartEvent, + CommonPGPipeline::WaitForActive::BlockingEvent, + PGActivationBlocker::BlockingEvent, + CommonPGPipeline::RecoverMissing::BlockingEvent, + CommonPGPipeline::GetOBC::BlockingEvent, + CommonPGPipeline::Process::BlockingEvent, + CompletionEvent + > tracking_events; }; } // namespace crimson::osd