summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-10-29 17:17:28 +0100
committerJens Axboe <axboe@kernel.dk>2018-11-07 21:42:32 +0100
commit3a7ea2c483a53fc89e336f69c6ee1d7defe00811 (patch)
tree8589297659b82fac50986256c47339f567faba0f /drivers
parentblk-mq: provide mq_ops->busy() hook (diff)
downloadlinux-3a7ea2c483a53fc89e336f69c6ee1d7defe00811.tar.xz
linux-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')
-rw-r--r--drivers/scsi/scsi_lib.c6
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,
};