diff options
author | Jim Ramsay <jim_ramsay@dell.com> | 2011-06-03 11:19:59 -0400 |
---|---|---|
committer | Mike Christie <michaelc@cs.wisc.edu> | 2011-07-07 16:39:13 -0500 |
commit | 3a89146c42863b7e06c52d914fb7c612b203f4c0 (patch) | |
tree | dff1f5c747334eb5d43db282c3596e91dbe3c303 /usr/initiator.c | |
parent | 2ec7d01db8193268ce5271d813875fb6684fced0 (diff) | |
download | open-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.c | 8 |
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) |