Skip to content

Commit

Permalink
blk-mq: don't fail allocating driver tag for stopped hw queue
Browse files Browse the repository at this point in the history
We rely on blk_mq_get_driver_tag() not failing if 'wait' is true,
but it currently fails in that case if the queue happens to be
stopped at the time of the call.

We don't need to check for stopped here, it's just assigning
the tag. If the queue is stopped, we'll handle it when
attempting to run the queue.

This fixes a stall/crash on flush intensive workloads, where
we proceed to process a flush that doesn't have a valid tag
assigned.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Feb 1, 2017
1 parent 7bf7d77 commit 12d7095
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,9 +856,6 @@ bool blk_mq_get_driver_tag(struct request *rq, struct blk_mq_hw_ctx **hctx,
.flags = wait ? 0 : BLK_MQ_REQ_NOWAIT,
};

if (blk_mq_hctx_stopped(data.hctx))
return false;

if (rq->tag != -1) {
done:
if (hctx)
Expand Down

0 comments on commit 12d7095

Please sign in to comment.