From f0446b23d00b35e37ee0224ee35cf717bebbed17 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 28 May 2024 20:45:26 +0000 Subject: [PATCH] crimson/.../snaptrim_event: SnapTrimObjSubEvent should enter WaitRepop Otherwise, it parks on Process until the repop completes blocking any other repops, including client IO. Since we don't actually care about ordering, simply calling handle.complete() would also be viable, but this is a valid usage of the stage and does provide information to an operator. Signed-off-by: Samuel Just --- src/crimson/osd/osd_operations/client_request.h | 3 --- src/crimson/osd/osd_operations/common/pg_pipeline.h | 3 +++ src/crimson/osd/osd_operations/snaptrim_event.cc | 8 ++++++-- src/crimson/osd/osd_operations/snaptrim_event.h | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/crimson/osd/osd_operations/client_request.h b/src/crimson/osd/osd_operations/client_request.h index 259d616ec24c..a0d723dbbcba 100644 --- a/src/crimson/osd/osd_operations/client_request.h +++ b/src/crimson/osd/osd_operations/client_request.h @@ -53,9 +53,6 @@ public: 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; diff --git a/src/crimson/osd/osd_operations/common/pg_pipeline.h b/src/crimson/osd/osd_operations/common/pg_pipeline.h index d6a5f686654b..d13dbe2e0d20 100644 --- a/src/crimson/osd/osd_operations/common/pg_pipeline.h +++ b/src/crimson/osd/osd_operations/common/pg_pipeline.h @@ -29,6 +29,9 @@ protected: struct Process : OrderedExclusivePhaseT { static constexpr auto type_name = "CommonPGPipeline::process"; } process; + struct WaitRepop : OrderedConcurrentPhaseT { + static constexpr auto type_name = "ClientRequest::PGPipeline::wait_repop"; + } wait_repop; }; } // namespace crimson::osd diff --git a/src/crimson/osd/osd_operations/snaptrim_event.cc b/src/crimson/osd/osd_operations/snaptrim_event.cc index 185af88c1158..c853de513c8e 100644 --- a/src/crimson/osd/osd_operations/snaptrim_event.cc +++ b/src/crimson/osd/osd_operations/snaptrim_event.cc @@ -416,8 +416,12 @@ SnapTrimObjSubEvent::start() std::move(osd_op_p), std::move(log_entries)); return submitted.then_interruptible( - [all_completed=std::move(all_completed), this] () mutable { - return std::move(all_completed); + [this, all_completed=std::move(all_completed)]() mutable { + return enter_stage( + client_pp().wait_repop + ).then_interruptible([all_completed=std::move(all_completed)]() mutable{ + return std::move(all_completed); + }); }); }); }); diff --git a/src/crimson/osd/osd_operations/snaptrim_event.h b/src/crimson/osd/osd_operations/snaptrim_event.h index c516769114e1..0e6c1e9d8fc7 100644 --- a/src/crimson/osd/osd_operations/snaptrim_event.h +++ b/src/crimson/osd/osd_operations/snaptrim_event.h @@ -168,6 +168,7 @@ public: StartEvent, CommonPGPipeline::GetOBC::BlockingEvent, CommonPGPipeline::Process::BlockingEvent, + CommonPGPipeline::WaitRepop::BlockingEvent, CompletionEvent > tracking_events; }; -- 2.47.3