summaryrefslogtreecommitdiff
path: root/include/scsi/scsi_transport_iscsi.h
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2006-04-07 06:13:36 +0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-14 23:03:41 +0400
commitfd7255f51a13ea915099c7e488001dfbbeb05104 (patch)
tree964624f68f000848dae1a9f4c396502849707826 /include/scsi/scsi_transport_iscsi.h
parentb5c7a12dc29ae0990d9e867749bdd717a3160325 (diff)
downloadlinux-fd7255f51a13ea915099c7e488001dfbbeb05104.tar.xz
[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 {
struct module *owner;
char *name;
unsigned int caps;
+ /* LLD sets this to indicate what values it can export to sysfs */
+ unsigned int param_mask;
struct scsi_host_template *host_template;
/* LLD session/scsi_host data size */
int hostdata_size;
- /* LLD iscsi_host data size */
- int ihostdata_size;
/* LLD connection data size */
int conndata_size;
/* LLD session data size */
@@ -79,10 +79,13 @@ struct iscsi_transport {
int (*set_param) (struct iscsi_cls_conn *conn, enum iscsi_param param,
uint32_t value);
int (*get_conn_param) (struct iscsi_cls_conn *conn,
- enum iscsi_param param,
- uint32_t *value);
+ enum iscsi_param param, uint32_t *value);
int (*get_session_param) (struct iscsi_cls_session *session,
enum iscsi_param param, uint32_t *value);
+ int (*get_conn_str_param) (struct iscsi_cls_conn *conn,
+ enum iscsi_param param, char *buf);
+ int (*get_session_str_param) (struct iscsi_cls_session *session,
+ enum iscsi_param param, char *buf);
int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr,
char *data, uint32_t data_size);
void (*get_stats) (struct iscsi_cls_conn *conn,
@@ -107,6 +110,14 @@ struct iscsi_cls_conn {
void *dd_data; /* LLD private data */
struct iscsi_transport *transport;
uint32_t cid; /* connection id */
+
+ /* portal/group values we got during discovery */
+ char *persistent_address;
+ int persistent_port;
+ /* portal/group values we are currently using */
+ char *address;
+ int port;
+
int active; /* must be accessed with the connlock */
struct device dev; /* sysfs transport/container device */
struct mempool_zone *z_error;
@@ -120,6 +131,11 @@ struct iscsi_cls_conn {
struct iscsi_cls_session {
struct list_head sess_list; /* item in session_list */
struct iscsi_transport *transport;
+
+ /* iSCSI values used as unique id by userspace. */
+ char *targetname;
+ int tpgt;
+
int sid; /* session id */
void *dd_data; /* LLD private data */
struct device dev; /* sysfs transport/container device */