Skip to content

Commit

Permalink
osd: requeue blocked op before flush it was blocked on
Browse files Browse the repository at this point in the history
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 11bdfb4)
  • Loading branch information
liewegas authored and ldachary committed Mar 10, 2015
1 parent b5a67f0 commit 66b13f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/osd/ReplicatedPG.cc
Expand Up @@ -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;
Expand Down

0 comments on commit 66b13f2

Please sign in to comment.