Skip to content

Commit

Permalink
scsi: provide mq_ops->busy() hook
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Axboe committed Nov 7, 2018
1 parent 9ba2052 commit 3a7ea2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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,
};

Expand Down

0 comments on commit 3a7ea2c

Please sign in to comment.