diff options
author | Ming Lei <ming.lei@redhat.com> | 2021-01-22 05:33:15 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-03-05 01:37:00 +0300 |
commit | 8278807abd338f2246b6ae8057f2ec61a80a5614 (patch) | |
tree | a6f22592e6418258cb86e2eff77c29959767bbba /drivers/scsi/sg.c | |
parent | 6cb9b15238a389a8892a6ed08f5c68a0ac45d720 (diff) | |
download | linux-8278807abd338f2246b6ae8057f2ec61a80a5614.tar.xz |
scsi: core: Add scsi_device_busy() wrapper
Add scsi_device_busy() helper to prepare drivers for tracking device queue
depth via sbitmap_queue.
Link: https://lore.kernel.org/r/20210122023317.687987-12-ming.lei@redhat.com
Cc: Omar Sandoval <osandov@fb.com>
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumanesh Samanta <sumanesh.samanta@broadcom.com>
Cc: Ewan D. Milne <emilne@redhat.com>
Tested-by: Sumanesh Samanta <sumanesh.samanta@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r-- | drivers/scsi/sg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 4383d93110f8..737cea9d908e 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -2503,7 +2503,7 @@ static int sg_proc_seq_show_dev(struct seq_file *s, void *v) scsidp->id, scsidp->lun, (int) scsidp->type, 1, (int) scsidp->queue_depth, - (int) atomic_read(&scsidp->device_busy), + (int) scsi_device_busy(scsidp), (int) scsi_device_online(scsidp)); } read_unlock_irqrestore(&sg_index_lock, iflags); |