diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-10-29 12:17:28 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-07 15:42:32 -0500 |
commit | 3a7ea2c483a53fc89e336f69c6ee1d7defe00811 (patch) | |
tree | 8589297659b82fac50986256c47339f567faba0f | |
parent | 9ba20527f4d1430b5f3e5f566be5af3e156a3284 (diff) |
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>
-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) | |||
1675 | return 0; | 1675 | return 0; |
1676 | } | 1676 | } |
1677 | 1677 | ||
1678 | static bool scsi_mq_lld_busy(struct request_queue *q) | ||
1679 | { | ||
1680 | return scsi_lld_busy(q); | ||
1681 | } | ||
1682 | |||
1678 | /* | 1683 | /* |
1679 | * Kill a request for a dead device | 1684 | * Kill a request for a dead device |
1680 | */ | 1685 | */ |
@@ -2326,6 +2331,7 @@ static const struct blk_mq_ops scsi_mq_ops = { | |||
2326 | .init_request = scsi_mq_init_request, | 2331 | .init_request = scsi_mq_init_request, |
2327 | .exit_request = scsi_mq_exit_request, | 2332 | .exit_request = scsi_mq_exit_request, |
2328 | .initialize_rq_fn = scsi_initialize_rq, | 2333 | .initialize_rq_fn = scsi_initialize_rq, |
2334 | .busy = scsi_mq_lld_busy, | ||
2329 | .map_queues = scsi_map_queues, | 2335 | .map_queues = scsi_map_queues, |
2330 | }; | 2336 | }; |
2331 | 2337 | ||