Only the SCSI legacy path provides a way to check if target is
currently busy, provide the same for the MQ path.

Cc: [email protected]
Signed-off-by: Jens Axboe <[email protected]>
---
 drivers/scsi/scsi_lib.c | 6 ++++++
 1 file changed, 6 insertions(+)

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,
 };
 
-- 
2.17.1

Reply via email to