From 66b13f2beff702c3b0bcb0aaa8da4e12d594eddf Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 11 Jan 2015 17:28:04 -0800 Subject: [PATCH] osd: requeue blocked op before flush it was blocked on If we have request A (say, cache-flush) that blocks things, and then request B that gets blocked on it, and we have an interval change, then we need to requeue B first, then A, so that the resulting queue will keep A before B and preserve the order. This was observed on this firefly run: ubuntu@teuthology:/a/sage-2015-01-09_21:43:43-rados-firefly-distro-basic-multi/694675 Backport: giant, firefly Fixes: #10512 Signed-off-by: Sage Weil (cherry picked from commit 11bdfb4131ecac16d4a364d651c6cf5d1d28c702) --- src/osd/ReplicatedPG.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index f1911c13f94..463cae441b9 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -6460,15 +6460,15 @@ void ReplicatedPG::cancel_flush(FlushOpRef fop, bool requeue) osd->objecter->op_cancel(fop->objecter_tid, -ECANCELED); fop->objecter_tid = 0; } + if (fop->blocking) { + fop->obc->stop_block(); + kick_object_context_blocked(fop->obc); + } if (requeue) { if (fop->op) requeue_op(fop->op); requeue_ops(fop->dup_ops); } - if (fop->blocking) { - fop->obc->stop_block(); - kick_object_context_blocked(fop->obc); - } if (fop->on_flush) { Context *on_flush = fop->on_flush; fop->on_flush = NULL; -- 2.47.3