blk-mq: move getting driver tag and budget into one helper
authorMing Lei <ming.lei@redhat.com>
Tue, 30 Jun 2020 10:24:58 +0000 (18:24 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 30 Jun 2020 13:51:48 +0000 (07:51 -0600)
commit7538352453189abf3a96461e187b1085b0ae0c6c
treee22ebc96ca8706dfab2b25b453b308d86903a4c5
parent445874e89f662c8c6a56e6bb820cbe9fbef61428
blk-mq: move getting driver tag and budget into one helper

Move code for getting driver tag and budget into one helper, so
blk_mq_dispatch_rq_list gets a bit simplified, and easier to read.

Meantime move updating of 'no_tag' and 'no_budget_available' into
the branch for handling partial dispatch because that is exactly
consumer of the two local variables.

Also rename the parameter of 'got_budget' as 'ask_budget'.

No functional change.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Tested-by: Baolin Wang <baolin.wang7@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Baolin Wang <baolin.wang7@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c