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>
This commit is contained in:
parent
3d3ca53b16
commit
dcece99e86
2 changed files with 40 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue