diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-10-29 10:17:28 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-07 13:42:32 -0700 |
commit | 3a7ea2c483a53fc89e336f69c6ee1d7defe00811 (patch) | |
tree | 8589297659b82fac50986256c47339f567faba0f /drivers/scsi/scsi_lib.c | |
parent | 9ba20527f4d1430b5f3e5f566be5af3e156a3284 (diff) | |
download | lwn-3a7ea2c483a53fc89e336f69c6ee1d7defe00811.tar.gz lwn-3a7ea2c483a53fc89e336f69c6ee1d7defe00811.zip |
scsi: provide mq_ops->busy() hook
Only the SCSI legacy path provides a way to check if target is
currently busy, provide the same for the MQ path.
Cc: linux-scsi@vger.kernel.org
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index c7fccbb8f554..8b0345924a92 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1675,6 +1675,11 @@ static int scsi_lld_busy(struct request_queue *q) return 0; } +static bool scsi_mq_lld_busy(struct request_queue *q) +{ + return scsi_lld_busy(q); +} + /* * Kill a request for a dead device */ @@ -2326,6 +2331,7 @@ static const struct blk_mq_ops scsi_mq_ops = { .init_request = scsi_mq_init_request, .exit_request = scsi_mq_exit_request, .initialize_rq_fn = scsi_initialize_rq, + .busy = scsi_mq_lld_busy, .map_queues = scsi_map_queues, }; |