Jens Axboe bf4907c05e blk-mq: fix schedule-under-preempt for blocking drivers
Commit a4d907b6a33b unified the single and multi queue request handlers,
but in the process, it also screwed up the locking balance and calls
blk_mq_try_issue_directly() with the ctx preempt lock held. This is a
problem for drivers that have set BLK_MQ_F_BLOCKING, since now they
can't reliably sleep.

While in there, protect against similar issues in the future, by adding
a might_sleep() trigger in the BLOCKING path for direct issue or queue
run.

Reported-by: Josef Bacik <josef@toxicpanda.com>
Tested-by: Josef Bacik <josef@toxicpanda.com>
Fixes: a4d907b6a33b ("blk-mq: streamline blk_mq_make_request")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2017-03-30 12:30:39 -06:00
..
2016-10-28 08:45:17 -06:00
2017-03-29 08:09:08 -06:00
2017-02-27 18:43:47 -08:00
2017-03-22 20:11:37 -06:00
2017-03-02 13:53:13 -08:00
2017-02-08 13:43:06 -07:00