Skip to content

Commit

Permalink
blk-cgroup: ensure that we clear the stop bit on quiesced queues
Browse files Browse the repository at this point in the history
If we call blk_mq_quiesce_queue() on a queue, we must remember to
pair that with something that clears the stopped by on the
queues later on.

Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Jens Axboe committed Jan 18, 2017
1 parent d348499 commit 4d199c6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions block/blk-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1265,9 +1265,10 @@ int blkcg_activate_policy(struct request_queue *q,

spin_unlock_irq(q->queue_lock);
out_bypass_end:
if (q->mq_ops)
if (q->mq_ops) {
blk_mq_unfreeze_queue(q);
else
blk_mq_start_stopped_hw_queues(q, true);
} else
blk_queue_bypass_end(q);
if (pd_prealloc)
pol->pd_free_fn(pd_prealloc);
Expand Down Expand Up @@ -1317,9 +1318,10 @@ void blkcg_deactivate_policy(struct request_queue *q,

spin_unlock_irq(q->queue_lock);

if (q->mq_ops)
if (q->mq_ops) {
blk_mq_unfreeze_queue(q);
else
blk_mq_start_stopped_hw_queues(q, true);
} else
blk_queue_bypass_end(q);
}
EXPORT_SYMBOL_GPL(blkcg_deactivate_policy);
Expand Down

0 comments on commit 4d199c6

Please sign in to comment.