Skip to content

Commit 12d7095

Browse files
committed
blk-mq: don't fail allocating driver tag for stopped hw queue
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]>
1 parent 7bf7d77 commit 12d7095

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

block/blk-mq.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -856,9 +856,6 @@ bool blk_mq_get_driver_tag(struct request *rq, struct blk_mq_hw_ctx **hctx,
856856
.flags = wait ? 0 : BLK_MQ_REQ_NOWAIT,
857857
};
858858

859-
if (blk_mq_hctx_stopped(data.hctx))
860-
return false;
861-
862859
if (rq->tag != -1) {
863860
done:
864861
if (hctx)

0 commit comments

Comments
 (0)