[SCSI] iscsi class, libiscsi: add iscsi sysfs session state file
This adds a iscsi session state file which exports the session state for both software and hardware iscsi. It also hooks libiscsi in. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
committed by
James Bottomley
parent
84ac86ca8c
commit
6eabafbe66
@ -135,6 +135,14 @@ static inline void* iscsi_next_hdr(struct iscsi_cmd_task *ctask)
|
||||
return (void*)ctask->hdr + ctask->hdr_len;
|
||||
}
|
||||
|
||||
/* Connection's states */
|
||||
enum {
|
||||
ISCSI_CONN_INITIAL_STAGE,
|
||||
ISCSI_CONN_STARTED,
|
||||
ISCSI_CONN_STOPPED,
|
||||
ISCSI_CONN_CLEANUP_WAIT,
|
||||
};
|
||||
|
||||
struct iscsi_conn {
|
||||
struct iscsi_cls_conn *cls_conn; /* ptr to class connection */
|
||||
void *dd_data; /* iscsi_transport data */
|
||||
@ -227,6 +235,17 @@ struct iscsi_pool {
|
||||
int max; /* Max number of elements */
|
||||
};
|
||||
|
||||
/* Session's states */
|
||||
enum {
|
||||
ISCSI_STATE_FREE = 1,
|
||||
ISCSI_STATE_LOGGED_IN,
|
||||
ISCSI_STATE_FAILED,
|
||||
ISCSI_STATE_TERMINATE,
|
||||
ISCSI_STATE_IN_RECOVERY,
|
||||
ISCSI_STATE_RECOVERY_FAILED,
|
||||
ISCSI_STATE_LOGGING_OUT,
|
||||
};
|
||||
|
||||
struct iscsi_session {
|
||||
/*
|
||||
* Syncs up the scsi eh thread with the iscsi eh thread when sending
|
||||
|
Reference in New Issue
Block a user