scsi: implement .get_budget and .put_budget for blk-mq
authorMing Lei <ming.lei@redhat.com>
Sat, 14 Oct 2017 09:22:32 +0000 (17:22 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 1 Nov 2017 14:20:02 +0000 (08:20 -0600)
commit0df21c86bdbfd17dec9ab898312af9bfb74d5d86
treea035d2c2b35dc838006ef6b85201ae2bc86b2d10
parentaeec77629a4ac6f8c248f3a82e80d4170a881f22
scsi: implement .get_budget and .put_budget for blk-mq

We need to tell blk-mq to reserve resources before queuing one request,
so implement these two callbacks. Then blk-mq can avoid to dequeue
request too early, and IO merging can be improved a lot.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/scsi_lib.c