diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-04-06 22:13:33 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-14 15:02:43 -0400 |
commit | b5c7a12dc29ae0990d9e867749bdd717a3160325 (patch) | |
tree | 66bb4b7fd02e5a8a89f385aadf80a666ac941fbe /include/scsi/iscsi_if.h | |
parent | 13f7e5acc8b329080672c13f05f252ace5b79825 (diff) |
[SCSI] iscsi: rm kernel iscsi handles usage for session and connection
from hare@suse.de and michaelc@cs.wisc.edu
hw iscsi like qla4xxx does not allocate a host per session and
for userspace it is difficult to restart iscsid using the
"iscsi handles" for the session and connection, so this
patch just has the class or userspace allocate the id for
the session and connection.
Note: this breaks userspace and requires users to upgrade to the newest
open-iscsi tools. Sorry about his but open-iscsi is still too new to
say we have a stable user-kernel api and we were not good nough
designers to know that other hw iscsi drivers and iscsid itself would
need such changes. Actually we sorta did but at the time we did not
have the HW available to us so we could only guess.
Luckily, the only tools hooking into the class are the open-iscsi ones
or other tools like iscsitart hook into the open-iscsi engine from
userspace or prgroams like anaconda call our tools so they are not affected.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi/iscsi_if.h')
-rw-r--r-- | include/scsi/iscsi_if.h | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index e5618b90996e..933a91b1474e 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -60,59 +60,68 @@ struct iscsi_uevent { | |||
60 | uint32_t initial_cmdsn; | 60 | uint32_t initial_cmdsn; |
61 | } c_session; | 61 | } c_session; |
62 | struct msg_destroy_session { | 62 | struct msg_destroy_session { |
63 | uint64_t session_handle; | ||
64 | uint32_t sid; | 63 | uint32_t sid; |
65 | } d_session; | 64 | } d_session; |
66 | struct msg_create_conn { | 65 | struct msg_create_conn { |
67 | uint64_t session_handle; | ||
68 | uint32_t cid; | ||
69 | uint32_t sid; | 66 | uint32_t sid; |
67 | uint32_t cid; | ||
70 | } c_conn; | 68 | } c_conn; |
71 | struct msg_bind_conn { | 69 | struct msg_bind_conn { |
72 | uint64_t session_handle; | 70 | uint32_t sid; |
73 | uint64_t conn_handle; | 71 | uint32_t cid; |
74 | uint32_t transport_fd; | 72 | uint32_t transport_fd; |
75 | uint32_t is_leading; | 73 | uint32_t is_leading; |
76 | } b_conn; | 74 | } b_conn; |
77 | struct msg_destroy_conn { | 75 | struct msg_destroy_conn { |
78 | uint64_t conn_handle; | 76 | uint32_t sid; |
79 | uint32_t cid; | 77 | uint32_t cid; |
80 | } d_conn; | 78 | } d_conn; |
81 | struct msg_send_pdu { | 79 | struct msg_send_pdu { |
80 | uint32_t sid; | ||
81 | uint32_t cid; | ||
82 | uint32_t hdr_size; | 82 | uint32_t hdr_size; |
83 | uint32_t data_size; | 83 | uint32_t data_size; |
84 | uint64_t conn_handle; | ||
85 | } send_pdu; | 84 | } send_pdu; |
86 | struct msg_set_param { | 85 | struct msg_set_param { |
87 | uint64_t conn_handle; | 86 | uint32_t sid; |
87 | uint32_t cid; | ||
88 | uint32_t param; /* enum iscsi_param */ | 88 | uint32_t param; /* enum iscsi_param */ |
89 | uint32_t value; | 89 | uint32_t value; |
90 | } set_param; | 90 | } set_param; |
91 | struct msg_start_conn { | 91 | struct msg_start_conn { |
92 | uint64_t conn_handle; | 92 | uint32_t sid; |
93 | uint32_t cid; | ||
93 | } start_conn; | 94 | } start_conn; |
94 | struct msg_stop_conn { | 95 | struct msg_stop_conn { |
96 | uint32_t sid; | ||
97 | uint32_t cid; | ||
95 | uint64_t conn_handle; | 98 | uint64_t conn_handle; |
96 | uint32_t flag; | 99 | uint32_t flag; |
97 | } stop_conn; | 100 | } stop_conn; |
98 | struct msg_get_stats { | 101 | struct msg_get_stats { |
99 | uint64_t conn_handle; | 102 | uint32_t sid; |
103 | uint32_t cid; | ||
100 | } get_stats; | 104 | } get_stats; |
101 | } u; | 105 | } u; |
102 | union { | 106 | union { |
103 | /* messages k -> u */ | 107 | /* messages k -> u */ |
104 | uint64_t handle; | ||
105 | int retcode; | 108 | int retcode; |
106 | struct msg_create_session_ret { | 109 | struct msg_create_session_ret { |
107 | uint64_t session_handle; | ||
108 | uint32_t sid; | 110 | uint32_t sid; |
111 | uint32_t host_no; | ||
109 | } c_session_ret; | 112 | } c_session_ret; |
113 | struct msg_create_conn_ret { | ||
114 | uint32_t sid; | ||
115 | uint32_t cid; | ||
116 | } c_conn_ret; | ||
110 | struct msg_recv_req { | 117 | struct msg_recv_req { |
118 | uint32_t sid; | ||
119 | uint32_t cid; | ||
111 | uint64_t recv_handle; | 120 | uint64_t recv_handle; |
112 | uint64_t conn_handle; | ||
113 | } recv_req; | 121 | } recv_req; |
114 | struct msg_conn_error { | 122 | struct msg_conn_error { |
115 | uint64_t conn_handle; | 123 | uint32_t sid; |
124 | uint32_t cid; | ||
116 | uint32_t error; /* enum iscsi_err */ | 125 | uint32_t error; /* enum iscsi_err */ |
117 | } connerror; | 126 | } connerror; |
118 | } r; | 127 | } r; |