Skip to content

Commit f0446b2

Browse files
committed
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 <[email protected]>
1 parent 403a0c2 commit f0446b2

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

src/crimson/osd/osd_operations/client_request.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ class ClientRequest final : public PhasedOperationT<ClientRequest>,
5353
struct AwaitMap : OrderedExclusivePhaseT<AwaitMap> {
5454
static constexpr auto type_name = "ClientRequest::PGPipeline::await_map";
5555
} await_map;
56-
struct WaitRepop : OrderedConcurrentPhaseT<WaitRepop> {
57-
static constexpr auto type_name = "ClientRequest::PGPipeline::wait_repop";
58-
} wait_repop;
5956
struct SendReply : OrderedExclusivePhaseT<SendReply> {
6057
static constexpr auto type_name = "ClientRequest::PGPipeline::send_reply";
6158
} send_reply;

src/crimson/osd/osd_operations/common/pg_pipeline.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ class CommonPGPipeline {
2929
struct Process : OrderedExclusivePhaseT<Process> {
3030
static constexpr auto type_name = "CommonPGPipeline::process";
3131
} process;
32+
struct WaitRepop : OrderedConcurrentPhaseT<WaitRepop> {
33+
static constexpr auto type_name = "ClientRequest::PGPipeline::wait_repop";
34+
} wait_repop;
3235
};
3336

3437
} // namespace crimson::osd

src/crimson/osd/osd_operations/snaptrim_event.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,12 @@ SnapTrimObjSubEvent::start()
416416
std::move(osd_op_p),
417417
std::move(log_entries));
418418
return submitted.then_interruptible(
419-
[all_completed=std::move(all_completed), this] () mutable {
420-
return std::move(all_completed);
419+
[this, all_completed=std::move(all_completed)]() mutable {
420+
return enter_stage<interruptor>(
421+
client_pp().wait_repop
422+
).then_interruptible([all_completed=std::move(all_completed)]() mutable{
423+
return std::move(all_completed);
424+
});
421425
});
422426
});
423427
});

src/crimson/osd/osd_operations/snaptrim_event.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ class SnapTrimObjSubEvent : public PhasedOperationT<SnapTrimObjSubEvent> {
168168
StartEvent,
169169
CommonPGPipeline::GetOBC::BlockingEvent,
170170
CommonPGPipeline::Process::BlockingEvent,
171+
CommonPGPipeline::WaitRepop::BlockingEvent,
171172
CompletionEvent
172173
> tracking_events;
173174
};

0 commit comments

Comments
 (0)