summaryrefslogtreecommitdiff
path: root/usr/initiator.c
diff options
context:
space:
mode:
authorJim Ramsay <jim_ramsay@dell.com>2011-06-03 11:19:59 -0400
committerMike Christie <michaelc@cs.wisc.edu>2011-07-07 16:39:13 -0500
commit3a89146c42863b7e06c52d914fb7c612b203f4c0 (patch)
treedff1f5c747334eb5d43db282c3596e91dbe3c303 /usr/initiator.c
parent2ec7d01db8193268ce5271d813875fb6684fced0 (diff)
downloadopen-iscsi-3a89146c42863b7e06c52d914fb7c612b203f4c0.tar.gz
Add support for multiple sessions per iface to iscsid
This introduces a new 'multiple' flag to the session_rec_t, which if set instructs iscsid to bypass the check which would normally prevent multiple sessions from a single iface record, allowing multiple sessions to be created. The commandline syntax to actually set this flag will be introduced in a later commit. Signed-off-by: Jim Ramsay <jim_ramsay@dell.com>
Diffstat (limited to 'usr/initiator.c')
-rw-r--r--usr/initiator.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/initiator.c b/usr/initiator.c
index c004406..823c3ce 100644
--- a/usr/initiator.c
+++ b/usr/initiator.c
@@ -1644,8 +1644,12 @@ session_login_task(node_rec_t *rec, queue_task_t *qtask)
struct iscsi_transport *t;
int rc;
- if (session_is_running(rec))
- return ISCSI_ERR_SESS_EXISTS;
+ if (session_is_running(rec)) {
+ if (rec->session.multiple)
+ log_debug(2, "Adding a copy of an existing session");
+ else
+ return ISCSI_ERR_SESS_EXISTS;
+ }
t = iscsi_sysfs_get_transport_by_name(rec->iface.transport_name);
if (!t)