[SCSI] libsas: Add SAS_HA state flags to avoid queueing events while unloading
Track sas_ha_struct state so that we ignore events that come in while we're shutting things down. Signed-off-by: Malahal Naineni <malahal@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
committed by
James Bottomley
parent
980fa2f9d6
commit
6b0efb8516
@@ -323,12 +323,20 @@ struct sas_ha_event {
|
||||
struct sas_ha_struct *ha;
|
||||
};
|
||||
|
||||
enum sas_ha_state {
|
||||
SAS_HA_REGISTERED,
|
||||
SAS_HA_UNREGISTERED
|
||||
};
|
||||
|
||||
struct sas_ha_struct {
|
||||
/* private: */
|
||||
spinlock_t event_lock;
|
||||
struct sas_ha_event ha_events[HA_NUM_EVENTS];
|
||||
unsigned long pending;
|
||||
|
||||
enum sas_ha_state state;
|
||||
spinlock_t state_lock;
|
||||
|
||||
struct scsi_core core;
|
||||
|
||||
/* public: */
|
||||
|
Reference in New Issue
Block a user