]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: requeue blocked op before flush it was blocked on 4041/head
authorSage Weil <sage@redhat.com>
Mon, 12 Jan 2015 01:28:04 +0000 (17:28 -0800)
committerLoic Dachary <ldachary@redhat.com>
Tue, 17 Mar 2015 16:27:19 +0000 (17:27 +0100)
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 <sage@redhat.com>
(cherry picked from commit 11bdfb4131ecac16d4a364d651c6cf5d1d28c702)

src/osd/ReplicatedPG.cc

index 9e5da1ffc80c731d7b7a9152cfb2cfcb070c56ea..b9edd70f44be7a0688935cf91e769fde1f5a5309 100644 (file)
@@ -6680,15 +6680,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;