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 17:17:24 +0000 (11:17 -0600)
commitc73b8adcc83cc5328c10e947dbcf5c7d861d155b
tree8e99571c3ce4bff1ca732820a55d0abea1824b41
parent94dbce5a6d7117336bd33963d045c234ef1f79b3
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