From: Sage Weil Date: Mon, 12 Jan 2015 01:28:04 +0000 (-0800) Subject: osd: requeue blocked op before flush it was blocked on X-Git-Tag: v0.80.10~60^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=66b13f2beff702c3b0bcb0aaa8da4e12d594eddf;p=ceph.git 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) --- 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;