blk-mq: Move more code into blk_mq_direct_issue_request()
authorBart Van Assche <bart.vanassche@sandisk.com>
Sat, 29 Oct 2016 00:20:02 +0000 (17:20 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 2 Nov 2016 18:50:19 +0000 (12:50 -0600)
commit2253efc850c4cf690516bbc07854eeb1077202ba
tree8e99571c3ce4bff1ca732820a55d0abea1824b41
parentfd00144301d64f1742541a3c5e64cd1c51f39c55
blk-mq: Move more code into blk_mq_direct_issue_request()

Move the "hctx stopped" test and the insert request calls into
blk_mq_direct_issue_request(). Rename that function into
blk_mq_try_issue_directly() to reflect its new semantics. Pass
the hctx pointer to that function instead of looking it up a
second time. These changes avoid that code has to be duplicated
in the next patch.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c