From owner-svn-src-head@freebsd.org Mon Sep 21 13:25:30 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82F53A05C15; Mon, 21 Sep 2015 13:25:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7451F124B; Mon, 21 Sep 2015 13:25:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8LDPUSt032144; Mon, 21 Sep 2015 13:25:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8LDPUM7032143; Mon, 21 Sep 2015 13:25:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509211325.t8LDPUM7032143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 21 Sep 2015 13:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288067 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2015 13:25:30 -0000 Author: mav Date: Mon Sep 21 13:25:29 2015 New Revision: 288067 URL: https://svnweb.freebsd.org/changeset/base/288067 Log: Log iSCSI session reinstatements. False session reinstatements can be result of misconfiguration, when several initiators use the same initiator name and ISID. Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Sep 21 12:53:26 2015 (r288066) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Sep 21 13:25:29 2015 (r288067) @@ -1611,6 +1611,16 @@ restart: if (cs2 != cs && cs2->cs_tasks_aborted == false && cs->cs_target == cs2->cs_target && strcmp(cs->cs_initiator_id, cs2->cs_initiator_id) == 0) { + if (strcmp(cs->cs_initiator_addr, + cs2->cs_initiator_addr) != 0) { + CFISCSI_SESSION_WARN(cs2, + "session reinstatement from " + "different address %s", + cs->cs_initiator_addr); + } else { + CFISCSI_SESSION_DEBUG(cs2, + "session reinstatement"); + } cfiscsi_session_terminate(cs2); mtx_unlock(&softc->lock); pause("cfiscsi_reinstate", 1);