summaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2020-02-28 10:53:15 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-02-29 04:54:52 +0300
commitdcece99e86b1191d2789fb5b5caa4c5b7fc2bfef (patch)
tree89a76da20eaf9c6a2add2f031c13bcdfde241253 /include/scsi
parent3d3ca53b163914c1397289d0c2ee6d2f52362dcc (diff)
downloadlinux-dcece99e86b1191d2789fb5b5caa4c5b7fc2bfef.tar.xz
scsi: core: add scsi_host_busy_iter()
Add an iterator scsi_host_busy_iter() to traverse all busy commands. If locking against concurrent command completions is required, it has to be provided by the caller. Link: https://lore.kernel.org/r/20200228075318.91255-11-hare@suse.de Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_host.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 613c3820028e..eff12445b823 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -761,6 +761,9 @@ extern void scsi_block_requests(struct Scsi_Host *);
extern int scsi_host_block(struct Scsi_Host *shost);
extern int scsi_host_unblock(struct Scsi_Host *shost, int new_state);
+void scsi_host_busy_iter(struct Scsi_Host *,
+ bool (*fn)(struct scsi_cmnd *, void *, bool), void *priv);
+
struct class_container;
/*