blk-mq: make blk_mq_alloc_request_hctx() allocate a scheduler request
authorOmar Sandoval <osandov@fb.com>
Mon, 27 Feb 2017 18:28:27 +0000 (10:28 -0800)
committerJens Axboe <axboe@fb.com>
Thu, 2 Mar 2017 15:56:04 +0000 (08:56 -0700)
commit6d2809d51a5079f01a416d91dd63b0766cb685d0
tree7f8b40edd637604227357062ce0c63be550b8ea4
parent415b806de5576b656f3ff94366589af9a161d0c8
blk-mq: make blk_mq_alloc_request_hctx() allocate a scheduler request

blk_mq_alloc_request_hctx() allocates a driver request directly, unlike
its blk_mq_alloc_request() counterpart. It also crashes because it
doesn't update the tags->rqs map.

Fix it by making it allocate a scheduler request.

Reported-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Tested-by: Sagi Grimberg <sagi@grimberg.me>
block/blk-mq-sched.c
block/blk-mq.c