diff options
author | Mike Anderson <andmike@us.ibm.com> | 2005-06-16 14:14:33 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-07-30 12:13:01 -0400 |
commit | 82f29467a025f6a2192d281e97fca0be46e905cc (patch) | |
tree | 5cf356ece53caf2936ca85803676b326094f7c38 /include | |
parent | d2c9d9eafa03dbd08a8a439e6c5addb8b1f03b9b (diff) |
[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>
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/scsi_host.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 0b1e275b2699..1ea5b51d1749 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -650,6 +650,15 @@ static inline struct device *scsi_get_device(struct Scsi_Host *shost) | |||
650 | return shost->shost_gendev.parent; | 650 | return shost->shost_gendev.parent; |
651 | } | 651 | } |
652 | 652 | ||
653 | /** | ||
654 | * scsi_host_scan_allowed - Is scanning of this host allowed | ||
655 | * @shost: Pointer to Scsi_Host. | ||
656 | **/ | ||
657 | static inline int scsi_host_scan_allowed(struct Scsi_Host *shost) | ||
658 | { | ||
659 | return shost->shost_state == SHOST_RUNNING; | ||
660 | } | ||
661 | |||
653 | extern void scsi_unblock_requests(struct Scsi_Host *); | 662 | extern void scsi_unblock_requests(struct Scsi_Host *); |
654 | extern void scsi_block_requests(struct Scsi_Host *); | 663 | extern void scsi_block_requests(struct Scsi_Host *); |
655 | 664 | ||