]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: don't handle failure in .get_budget
authorMing Lei <ming.lei@redhat.com>
Sat, 4 Nov 2017 18:21:12 +0000 (02:21 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 4 Nov 2017 18:31:08 +0000 (12:31 -0600)
commit48545135b94228171ff06ac9b245d0790f8c17ff
treeec0b9e2d1227a7101040f954aef16511a5b6fa46
parenta565e906f8f539a76ddca65d0b53b9bb0b992615
blk-mq: don't handle failure in .get_budget

It is enough to just check if we can get the budget via .get_budget().
And we don't need to deal with device state change in .get_budget().

For SCSI, one issue to be fixed is that we have to call
scsi_mq_uninit_cmd() to free allocated ressources if SCSI device fails
to handle the request. And it isn't enough to simply call
blk_mq_end_request() to do that if this request is marked as
RQF_DONTPREP.

Fixes: 3af949b7b8da(scsi: implement .get_budget and .put_budget for blk-mq)
Signed-off-by: Ming Lei <ming.lei@redhat.com>
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