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: 0df21c86(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>
Showing
- block/blk-mq-sched.c 2 additions, 12 deletionsblock/blk-mq-sched.c
- block/blk-mq.c 4 additions, 13 deletionsblock/blk-mq.c
- block/blk-mq.h 2 additions, 3 deletionsblock/blk-mq.h
- drivers/scsi/scsi_lib.c 3 additions, 8 deletionsdrivers/scsi/scsi_lib.c
- include/linux/blk-mq.h 1 addition, 1 deletioninclude/linux/blk-mq.h
Loading
Please register or sign in to comment