summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2007-08-22 04:35:07 -0500
committerMike Christie <michaelc@cs.wisc.edu>2007-08-27 19:37:51 -0500
commita3e4c5202918409d54a893216a1d6555dc38cfe9 (patch)
tree7a150c2145b9f3418a9d75c31cb6202ff1120169 /include
parent440c057de0d5661bf4ec82911f2e494eeb7912ca (diff)
downloadopen-iscsi-a3e4c5202918409d54a893216a1d6555dc38cfe9.tar.gz
fix shutdown
We were using the device delete sysfs file to remove each device then logout. Now in 2.6.21 and .22 this will not work because the sysfs delete file returns immediately and does not wait for the device removal to complete. This causes a hang if a cache sync is needed during shutdown. This patch fixes the shutdown code so that we remove the target and unbind the session before logging out and shuttdown the session. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Diffstat (limited to 'include')
-rw-r--r--include/iscsi_if.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/iscsi_if.h b/include/iscsi_if.h
index 803e8d9..7820294 100644
--- a/include/iscsi_if.h
+++ b/include/iscsi_if.h
@@ -49,12 +49,15 @@ enum iscsi_uevent_e {
ISCSI_UEVENT_TGT_DSCVR = UEVENT_BASE + 15,
ISCSI_UEVENT_SET_HOST_PARAM = UEVENT_BASE + 16,
+ ISCSI_UEVENT_UNBIND_SESSION = UEVENT_BASE + 17,
/* up events */
ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1,
ISCSI_KEVENT_CONN_ERROR = KEVENT_BASE + 2,
ISCSI_KEVENT_IF_ERROR = KEVENT_BASE + 3,
ISCSI_KEVENT_DESTROY_SESSION = KEVENT_BASE + 4,
+ ISCSI_KEVENT_UNBIND_SESSION = KEVENT_BASE + 5,
+ ISCSI_KEVENT_CREATE_SESSION = KEVENT_BASE + 6,
};
enum iscsi_tgt_dscvr {
@@ -156,6 +159,10 @@ struct iscsi_uevent {
uint32_t sid;
uint32_t cid;
} c_conn_ret;
+ struct msg_unbind_session {
+ uint32_t sid;
+ uint32_t host_no;
+ } unbind_session;
struct msg_recv_req {
uint32_t sid;
uint32_t cid;