]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
blk-mq: refactor the code of issue request directly
authorJianchao Wang <jianchao.w.wang@oracle.com>
Fri, 14 Dec 2018 01:28:18 +0000 (09:28 +0800)
committerJens Axboe <axboe@kernel.dk>
Sun, 16 Dec 2018 15:33:57 +0000 (08:33 -0700)
commit7f556a44e61d0b62d78db9a2662a5f0daef010f2
treee4712b5c0ac800c08863d55fe4c4781d7ffc4f73
parent4c9770c90fc5b6d6b6d190d108c061015f5804f7
blk-mq: refactor the code of issue request directly

Merge blk_mq_try_issue_directly and __blk_mq_try_issue_directly
into one interface to unify the interfaces to issue requests
directly. The merged interface takes over the requests totally,
it could insert, end or do nothing based on the return value of
.queue_rq and 'bypass' parameter. Then caller needn't any other
handling any more and then code could be cleaned up.

And also the commit c616cbee ( blk-mq: punt failed direct issue
to dispatch list ) always inserts requests to hctx dispatch list
whenever get a BLK_STS_RESOURCE or BLK_STS_DEV_RESOURCE, this is
overkill and will harm the merging. We just need to do that for
the requests that has been through .queue_rq. This patch also
could fix this.

Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c