]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: update hardware and software queues for sleeping alloc
authorJens Axboe <axboe@fb.com>
Thu, 27 Oct 2016 15:49:19 +0000 (09:49 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 27 Oct 2016 15:56:03 +0000 (09:56 -0600)
commit963d5da64165eba63fded6933808c9c939edb863
tree9ee240140ac26203b706e4b8e277dcea147f5d51
parente143fc3d97b9df778f93316e497694d9b07d00be
blk-mq: update hardware and software queues for sleeping alloc

If we end up sleeping due to running out of requests, we should
update the hardware and software queues in the map ctx structure.
Otherwise we could end up having rq->mq_ctx point to the pre-sleep
context, and risk corrupting ctx->rq_list since we'll be
grabbing the wrong lock when inserting the request.

Reported-by: Dave Jones <davej@codemonkey.org.uk>
Reported-by: Chris Mason <clm@fb.com>
Tested-by: Chris Mason <clm@fb.com>
Fixes: f73bf680c2a5 ("blk-mq: remove non-blocking pass in blk_mq_map_request")
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c