aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_iscsi.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-05-21 16:54:16 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 09:22:21 -0400
commit88dfd340b9dece8fcaa1a2d4c782338926c017f7 (patch)
tree89800910ef8636f00d2c66ce4e83a161087857e6 /drivers/scsi/scsi_transport_iscsi.c
parent06520edea0fc7007985fa4cd51560149feb3f442 (diff)
[SCSI] iscsi class: Add session initiatorname and ifacename sysfs attrs.
This adds two new attrs used for creating initiator ports and binding sessions to hardware. The session level initiatorname: Since bnx2i does a scsi_host per host device, we need to add the iface initiator port settings on the session, so we can create multiple initiator ports (each with different inames) per device/scsi_host. The current iname reflects that qla4xxx can have one iname per hba, and we are allocating a host per session for software. The iname on the host will remain so we can export and set the hba level qla4xxx setting. The ifacename attr: To bind a session to a some peice of hardware in userspace we maintain some mappings, but during boot or iscsid restart (iscsid contains the user space part of the driver) we need to be able to figure out which of those host mappings abstractions maps to certain sessions. This patch adds a ifacename attr, which userspace can set to id the host side of the endpoint across pivot_roots and iscsid restarts. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index c3c07ccccca..9fd5c6d87ed 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -30,7 +30,7 @@
30#include <scsi/scsi_transport_iscsi.h> 30#include <scsi/scsi_transport_iscsi.h>
31#include <scsi/iscsi_if.h> 31#include <scsi/iscsi_if.h>
32 32
33#define ISCSI_SESSION_ATTRS 19 33#define ISCSI_SESSION_ATTRS 21
34#define ISCSI_CONN_ATTRS 13 34#define ISCSI_CONN_ATTRS 13
35#define ISCSI_HOST_ATTRS 4 35#define ISCSI_HOST_ATTRS 4
36 36
@@ -1634,6 +1634,8 @@ iscsi_session_attr(password_in, ISCSI_PARAM_PASSWORD_IN, 1);
1634iscsi_session_attr(fast_abort, ISCSI_PARAM_FAST_ABORT, 0); 1634iscsi_session_attr(fast_abort, ISCSI_PARAM_FAST_ABORT, 0);
1635iscsi_session_attr(abort_tmo, ISCSI_PARAM_ABORT_TMO, 0); 1635iscsi_session_attr(abort_tmo, ISCSI_PARAM_ABORT_TMO, 0);
1636iscsi_session_attr(lu_reset_tmo, ISCSI_PARAM_LU_RESET_TMO, 0); 1636iscsi_session_attr(lu_reset_tmo, ISCSI_PARAM_LU_RESET_TMO, 0);
1637iscsi_session_attr(ifacename, ISCSI_PARAM_IFACE_NAME, 0);
1638iscsi_session_attr(initiatorname, ISCSI_PARAM_INITIATOR_NAME, 0)
1637 1639
1638static ssize_t 1640static ssize_t
1639show_priv_session_state(struct device *dev, struct device_attribute *attr, 1641show_priv_session_state(struct device *dev, struct device_attribute *attr,
@@ -1875,6 +1877,8 @@ iscsi_register_transport(struct iscsi_transport *tt)
1875 SETUP_SESSION_RD_ATTR(fast_abort, ISCSI_FAST_ABORT); 1877 SETUP_SESSION_RD_ATTR(fast_abort, ISCSI_FAST_ABORT);
1876 SETUP_SESSION_RD_ATTR(abort_tmo, ISCSI_ABORT_TMO); 1878 SETUP_SESSION_RD_ATTR(abort_tmo, ISCSI_ABORT_TMO);
1877 SETUP_SESSION_RD_ATTR(lu_reset_tmo,ISCSI_LU_RESET_TMO); 1879 SETUP_SESSION_RD_ATTR(lu_reset_tmo,ISCSI_LU_RESET_TMO);
1880 SETUP_SESSION_RD_ATTR(ifacename, ISCSI_IFACE_NAME);
1881 SETUP_SESSION_RD_ATTR(initiatorname, ISCSI_INITIATOR_NAME);
1878 SETUP_PRIV_SESSION_RD_ATTR(recovery_tmo); 1882 SETUP_PRIV_SESSION_RD_ATTR(recovery_tmo);
1879 SETUP_PRIV_SESSION_RD_ATTR(state); 1883 SETUP_PRIV_SESSION_RD_ATTR(state);
1880 1884