]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/.../snaptrim_event: SnapTrimObjSubEvent should enter WaitRepop 57978/head
authorSamuel Just <sjust@redhat.com>
Tue, 28 May 2024 20:45:26 +0000 (20:45 +0000)
committerSamuel Just <sjust@redhat.com>
Thu, 13 Jun 2024 18:44:57 +0000 (11:44 -0700)
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 <sjust@redhat.com>
src/crimson/osd/osd_operations/client_request.h
src/crimson/osd/osd_operations/common/pg_pipeline.h
src/crimson/osd/osd_operations/snaptrim_event.cc
src/crimson/osd/osd_operations/snaptrim_event.h

index 259d616ec24c42d9d49c561e240fc5c628440774..a0d723dbbcbacc696c5cc905033807c82484bf5c 100644 (file)
@@ -53,9 +53,6 @@ public:
     struct AwaitMap : OrderedExclusivePhaseT<AwaitMap> {
       static constexpr auto type_name = "ClientRequest::PGPipeline::await_map";
     } await_map;
-    struct WaitRepop : OrderedConcurrentPhaseT<WaitRepop> {
-      static constexpr auto type_name = "ClientRequest::PGPipeline::wait_repop";
-    } wait_repop;
     struct SendReply : OrderedExclusivePhaseT<SendReply> {
       static constexpr auto type_name = "ClientRequest::PGPipeline::send_reply";
     } send_reply;
index d6a5f686654b46ae1ccd76460c63afe86e096992..d13dbe2e0d20039c84bc7735ecba3d24f4a25527 100644 (file)
@@ -29,6 +29,9 @@ protected:
   struct Process : OrderedExclusivePhaseT<Process> {
     static constexpr auto type_name = "CommonPGPipeline::process";
   } process;
+  struct WaitRepop : OrderedConcurrentPhaseT<WaitRepop> {
+    static constexpr auto type_name = "ClientRequest::PGPipeline::wait_repop";
+  } wait_repop;
 };
 
 } // namespace crimson::osd
index 185af88c1158926aece600824f7b16727280ab23..c853de513c8e4a3f65d9a79adc721c30618f8d67 100644 (file)
@@ -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<interruptor>(
+                 client_pp().wait_repop
+               ).then_interruptible([all_completed=std::move(all_completed)]() mutable{
+                 return std::move(all_completed);
+               });
              });
          });
        });
index c516769114e184f221b3e26227819d8600440046..0e6c1e9d8fc7301e1629d6376e3d2f515e4bb75a 100644 (file)
@@ -168,6 +168,7 @@ public:
     StartEvent,
     CommonPGPipeline::GetOBC::BlockingEvent,
     CommonPGPipeline::Process::BlockingEvent,
+    CommonPGPipeline::WaitRepop::BlockingEvent,
     CompletionEvent
   > tracking_events;
 };