From: Samuel Just Date: Tue, 28 May 2024 20:45:26 +0000 (+0000) Subject: crimson/.../snaptrim_event: SnapTrimObjSubEvent should enter WaitRepop X-Git-Tag: v20.0.0~1716^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F57978%2Fhead;p=ceph.git 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 --- diff --git a/src/crimson/osd/osd_operations/client_request.h b/src/crimson/osd/osd_operations/client_request.h index 259d616ec24..a0d723dbbcb 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 d6a5f686654..d13dbe2e0d2 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 185af88c115..c853de513c8 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 c516769114e..0e6c1e9d8fc 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; };