From 5c83589ae51cd3138b9fa3f7c0c539f013392d3d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rados=C5=82aw=20Zarzy=C5=84ski?= Date: Sun, 3 Apr 2022 13:23:53 +0200 Subject: [PATCH] crimson/osd: switch all ClientRequest-related pipeline stages to the new infra MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Radosław Zarzyński --- .../osd/osd_operations/client_request.h | 35 +++++++++++-------- .../osd/osd_operations/common/pg_pipeline.h | 24 ++++++------- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/src/crimson/osd/osd_operations/client_request.h b/src/crimson/osd/osd_operations/client_request.h index db99fd85e9f4c..5777bd4518429 100644 --- a/src/crimson/osd/osd_operations/client_request.h +++ b/src/crimson/osd/osd_operations/client_request.h @@ -26,24 +26,29 @@ class ClientRequest final : public OperationT, public: class ConnectionPipeline { - OrderedExclusivePhase await_map = { - "ClientRequest::ConnectionPipeline::await_map" - }; - OrderedExclusivePhase get_pg = { - "ClientRequest::ConnectionPipeline::get_pg" - }; + struct AwaitMap : OrderedExclusivePhaseT { + static constexpr auto type_name = + "ClientRequest::ConnectionPipeline::await_map"; + } await_map; + + struct GetPG : OrderedExclusivePhaseT { + static constexpr auto type_name = + "ClientRequest::ConnectionPipeline::get_pg"; + } get_pg; + friend class ClientRequest; }; + class PGPipeline : public CommonPGPipeline { - OrderedExclusivePhase await_map = { - "ClientRequest::PGPipeline::await_map" - }; - OrderedConcurrentPhase wait_repop = { - "ClientRequest::PGPipeline::wait_repop" - }; - OrderedExclusivePhase send_reply = { - "ClientRequest::PGPipeline::send_reply" - }; + struct AwaitMap : OrderedExclusivePhaseT { + static constexpr auto type_name = "ClientRequest::PGPipeline::await_map"; + } await_map; + struct WaitRepop : OrderedConcurrentPhaseT { + static constexpr auto type_name = "ClientRequest::PGPipeline::wait_repop"; + } wait_repop; + struct SendReply : OrderedExclusivePhaseT { + static constexpr auto type_name = "ClientRequest::PGPipeline::send_reply"; + } send_reply; friend class ClientRequest; }; diff --git a/src/crimson/osd/osd_operations/common/pg_pipeline.h b/src/crimson/osd/osd_operations/common/pg_pipeline.h index ed9ab25cc48af..20417d0277476 100644 --- a/src/crimson/osd/osd_operations/common/pg_pipeline.h +++ b/src/crimson/osd/osd_operations/common/pg_pipeline.h @@ -12,18 +12,18 @@ class CommonPGPipeline { protected: friend class InternalClientRequest; - OrderedExclusivePhase wait_for_active = { - "CommonPGPipeline:::wait_for_active" - }; - OrderedExclusivePhase recover_missing = { - "CommonPGPipeline::recover_missing" - }; - OrderedExclusivePhase get_obc = { - "CommonPGPipeline::get_obc" - }; - OrderedExclusivePhase process = { - "CommonPGPipeline::process" - }; + struct WaitForActive : OrderedExclusivePhaseT { + static constexpr auto type_name = "CommonPGPipeline:::wait_for_active"; + } wait_for_active; + struct RecoverMissing : OrderedExclusivePhaseT { + static constexpr auto type_name = "CommonPGPipeline::recover_missing"; + } recover_missing; + struct GetOBC : OrderedExclusivePhaseT { + static constexpr auto type_name = "CommonPGPipeline::get_obc"; + } get_obc; + struct Process : OrderedExclusivePhaseT { + static constexpr auto type_name = "CommonPGPipeline::process"; + } process; }; } // namespace crimson::osd -- 2.39.5