[SCSI] host state model update: mediate host add/remove race
Add support to not allow additions to a host when it is being removed. Signed-off-by: Mike Anderson <andmike@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
committed by
James Bottomley
parent
d2c9d9eafa
commit
82f29467a0
@ -650,6 +650,15 @@ static inline struct device *scsi_get_device(struct Scsi_Host *shost)
|
||||
return shost->shost_gendev.parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* scsi_host_scan_allowed - Is scanning of this host allowed
|
||||
* @shost: Pointer to Scsi_Host.
|
||||
**/
|
||||
static inline int scsi_host_scan_allowed(struct Scsi_Host *shost)
|
||||
{
|
||||
return shost->shost_state == SHOST_RUNNING;
|
||||
}
|
||||
|
||||
extern void scsi_unblock_requests(struct Scsi_Host *);
|
||||
extern void scsi_block_requests(struct Scsi_Host *);
|
||||
|
||||
|
Reference in New Issue
Block a user