blk-mq: pass request queue into get/put budget callback
authorMing Lei <ming.lei@redhat.com>
Tue, 30 Jun 2020 10:24:56 +0000 (18:24 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 30 Jun 2020 13:51:48 +0000 (07:51 -0600)
commit65c763694398a2de63803b264dcf906b47f9d4c1
treeb5047ad8b5963a9933990a2d5bb4f55dabafa099
parent42fdc5e49c2be97db112d410d07044e0e2c7d5bb
blk-mq: pass request queue into get/put budget callback

blk-mq budget is abstract from scsi's device queue depth, and it is
always per-request-queue instead of hctx.

It can be quite absurd to get a budget from one hctx, then dequeue a
request from scheduler queue, and this request may not belong to this
hctx, at least for bfq and deadline.

So fix the mess and always pass request queue to get/put budget
callback.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Tested-by: Baolin Wang <baolin.wang7@gmail.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Baolin Wang <baolin.wang7@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-sched.c
block/blk-mq.c
block/blk-mq.h
drivers/scsi/scsi_lib.c
include/linux/blk-mq.h