[Pkg-iscsi-maintainers] [SCM] Debian Open-iSCSI Packaging branch, upstream-mnc, updated. 2.0-872-193-gde2c0e7

Mike Christie michaelc at cs.wisc.edu
Sat Apr 7 15:43:57 UTC 2012


The following commit has been merged in the upstream-mnc branch:
commit 9da468c3bb5a7c8557949ce96c16756fdb9a7832
Author: Mike Christie <michaelc at cs.wisc.edu>
Date:   Tue Nov 1 19:49:30 2011 -0500

    iscsid: kill session if already exists.
    
    If the kernel has already created a session then kill and
    cleanup the session we were trying to start. This occurs
    when using qla4xxx and it creates FLASH/FW sessions but
    the user also requests to have open-iscsi create them too.

diff --git a/usr/initiator.c b/usr/initiator.c
index 663c3ee..79ca32c 100644
--- a/usr/initiator.c
+++ b/usr/initiator.c
@@ -1477,9 +1477,15 @@ static void setup_offload_login_phase(iscsi_conn_t *conn)
 	conn->state = ISCSI_CONN_STATE_IN_LOGIN;
 	if (ipc->start_conn(session->t->handle, session->id, conn->id,
 			    &rc) || rc) {
-		log_error("can't start connection %d:%d retcode %d (%d)",
-			  session->id, conn->id, rc, errno);
-		iscsi_login_eh(conn, c->qtask, ISCSI_ERR_INTERNAL);
+		if (rc == -EEXIST) {
+			log_error("Session already exists.");
+			session_conn_shutdown(conn, c->qtask,
+					      ISCSI_ERR_SESS_EXISTS);
+		} else {
+			log_error("can't start connection %d:%d retcode (%d)",
+				  session->id, conn->id, rc);
+			iscsi_login_eh(conn, c->qtask, ISCSI_ERR_INTERNAL);
+		}
 		return;
 	}
 

-- 
Debian Open-iSCSI Packaging



More information about the Pkg-iscsi-maintainers mailing list