From be873eb8da7b29ecefaa5a99b88de7ddcca711ee Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 20 May 2015 16:10:02 -0700 Subject: [PATCH] ReplicatedPG::release_op_ctx_locks: requeue in scrub queue if blocked Otherwise we can reorder an op around another op which got blocked by a scrub which started after the first blocked on an obc. Fixes: #11691 Signed-off-by: Samuel Just --- src/osd/ReplicatedPG.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index f2dfca9faf16..34396837e29e 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -866,7 +866,20 @@ protected: requeue_snaptrimmer_clone || requeue_snaptrimmer_snapset) queue_snap_trim(); - requeue_ops(to_req); + + if (!to_req.empty()) { + assert(ctx->obc); + // requeue at front of scrub blocking queue if we are blocked by scrub + if (scrubber.write_blocked_by_scrub(ctx->obc->obs.oi.soid.get_head())) { + waiting_for_active.splice( + waiting_for_active.begin(), + to_req, + to_req.begin(), + to_req.end()); + } else { + requeue_ops(to_req); + } + } } // replica ops -- 2.47.3