aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_transport_iscsi.h
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2006-04-06 22:13:36 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-14 15:03:41 -0400
commitfd7255f51a13ea915099c7e488001dfbbeb05104 (patch)
tree964624f68f000848dae1a9f4c396502849707826 /include/scsi/scsi_transport_iscsi.h
parentb5c7a12dc29ae0990d9e867749bdd717a3160325 (diff)
[SCSI] iscsi: add sysfs attrs for uspace sync up
For iscsi boot when going from initramfs to the real root we need to stop the userpsace iscsi daemon. To later restart it iscsid needs to be able to rebuild itself and part of that process is matching a session running the kernel with the iscsid representation. To do this the attached patch adds several required iscsi values. If the LLD does not provide them becuase, login is done in userspace, then the transport class and userspace set ths up for the LLD. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi/scsi_transport_iscsi.h')
-rw-r--r--include/scsi/scsi_transport_iscsi.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 631463cd4892..4b200645c84b 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -53,11 +53,11 @@ struct iscsi_transport {
53 struct module *owner; 53 struct module *owner;
54 char *name; 54 char *name;
55 unsigned int caps; 55 unsigned int caps;
56 /* LLD sets this to indicate what values it can export to sysfs */
57 unsigned int param_mask;
56 struct scsi_host_template *host_template; 58 struct scsi_host_template *host_template;
57 /* LLD session/scsi_host data size */ 59 /* LLD session/scsi_host data size */
58 int hostdata_size; 60 int hostdata_size;
59 /* LLD iscsi_host data size */
60 int ihostdata_size;
61 /* LLD connection data size */ 61 /* LLD connection data size */
62 int conndata_size; 62 int conndata_size;
63 /* LLD session data size */ 63 /* LLD session data size */
@@ -79,10 +79,13 @@ struct iscsi_transport {
79 int (*set_param) (struct iscsi_cls_conn *conn, enum iscsi_param param, 79 int (*set_param) (struct iscsi_cls_conn *conn, enum iscsi_param param,
80 uint32_t value); 80 uint32_t value);
81 int (*get_conn_param) (struct iscsi_cls_conn *conn, 81 int (*get_conn_param) (struct iscsi_cls_conn *conn,
82 enum iscsi_param param, 82 enum iscsi_param param, uint32_t *value);
83 uint32_t *value);
84 int (*get_session_param) (struct iscsi_cls_session *session, 83 int (*get_session_param) (struct iscsi_cls_session *session,
85 enum iscsi_param param, uint32_t *value); 84 enum iscsi_param param, uint32_t *value);
85 int (*get_conn_str_param) (struct iscsi_cls_conn *conn,
86 enum iscsi_param param, char *buf);
87 int (*get_session_str_param) (struct iscsi_cls_session *session,
88 enum iscsi_param param, char *buf);
86 int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, 89 int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr,
87 char *data, uint32_t data_size); 90 char *data, uint32_t data_size);
88 void (*get_stats) (struct iscsi_cls_conn *conn, 91 void (*get_stats) (struct iscsi_cls_conn *conn,
@@ -107,6 +110,14 @@ struct iscsi_cls_conn {
107 void *dd_data; /* LLD private data */ 110 void *dd_data; /* LLD private data */
108 struct iscsi_transport *transport; 111 struct iscsi_transport *transport;
109 uint32_t cid; /* connection id */ 112 uint32_t cid; /* connection id */
113
114 /* portal/group values we got during discovery */
115 char *persistent_address;
116 int persistent_port;
117 /* portal/group values we are currently using */
118 char *address;
119 int port;
120
110 int active; /* must be accessed with the connlock */ 121 int active; /* must be accessed with the connlock */
111 struct device dev; /* sysfs transport/container device */ 122 struct device dev; /* sysfs transport/container device */
112 struct mempool_zone *z_error; 123 struct mempool_zone *z_error;
@@ -120,6 +131,11 @@ struct iscsi_cls_conn {
120struct iscsi_cls_session { 131struct iscsi_cls_session {
121 struct list_head sess_list; /* item in session_list */ 132 struct list_head sess_list; /* item in session_list */
122 struct iscsi_transport *transport; 133 struct iscsi_transport *transport;
134
135 /* iSCSI values used as unique id by userspace. */
136 char *targetname;
137 int tpgt;
138
123 int sid; /* session id */ 139 int sid; /* session id */
124 void *dd_data; /* LLD private data */ 140 void *dd_data; /* LLD private data */
125 struct device dev; /* sysfs transport/container device */ 141 struct device dev; /* sysfs transport/container device */