aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libiscsi.h
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-01-31 14:36:43 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-07 19:02:34 -0500
commit6eabafbe6616266e8de61980a7dac5ecc1ba1113 (patch)
treef5533027fac576acf4db08210ea5815db3a15e50 /include/scsi/libiscsi.h
parent84ac86ca8c6787f9efff28bc04b1b65fe0a5c310 (diff)
[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>
Diffstat (limited to 'include/scsi/libiscsi.h')
-rw-r--r--include/scsi/libiscsi.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 71eda24114e9..278011fb3c2f 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -135,6 +135,14 @@ static inline void* iscsi_next_hdr(struct iscsi_cmd_task *ctask)
135 return (void*)ctask->hdr + ctask->hdr_len; 135 return (void*)ctask->hdr + ctask->hdr_len;
136} 136}
137 137
138/* Connection's states */
139enum {
140 ISCSI_CONN_INITIAL_STAGE,
141 ISCSI_CONN_STARTED,
142 ISCSI_CONN_STOPPED,
143 ISCSI_CONN_CLEANUP_WAIT,
144};
145
138struct iscsi_conn { 146struct iscsi_conn {
139 struct iscsi_cls_conn *cls_conn; /* ptr to class connection */ 147 struct iscsi_cls_conn *cls_conn; /* ptr to class connection */
140 void *dd_data; /* iscsi_transport data */ 148 void *dd_data; /* iscsi_transport data */
@@ -227,6 +235,17 @@ struct iscsi_pool {
227 int max; /* Max number of elements */ 235 int max; /* Max number of elements */
228}; 236};
229 237
238/* Session's states */
239enum {
240 ISCSI_STATE_FREE = 1,
241 ISCSI_STATE_LOGGED_IN,
242 ISCSI_STATE_FAILED,
243 ISCSI_STATE_TERMINATE,
244 ISCSI_STATE_IN_RECOVERY,
245 ISCSI_STATE_RECOVERY_FAILED,
246 ISCSI_STATE_LOGGING_OUT,
247};
248
230struct iscsi_session { 249struct iscsi_session {
231 /* 250 /*
232 * Syncs up the scsi eh thread with the iscsi eh thread when sending 251 * Syncs up the scsi eh thread with the iscsi eh thread when sending