svn commit: r312574 - stable/11/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Sat Jan 21 08:32:28 UTC 2017


Author: mav
Date: Sat Jan 21 08:32:27 2017
New Revision: 312574
URL: https://svnweb.freebsd.org/changeset/base/312574

Log:
  MFC r310575: Fix improperly used nexus.targ_lun.

Modified:
  stable/11/sys/cam/ctl/ctl.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/ctl/ctl.c
==============================================================================
--- stable/11/sys/cam/ctl/ctl.c	Sat Jan 21 08:31:49 2017	(r312573)
+++ stable/11/sys/cam/ctl/ctl.c	Sat Jan 21 08:32:27 2017	(r312574)
@@ -1024,7 +1024,7 @@ ctl_isc_ua(struct ctl_softc *softc, unio
 	uint32_t iid = ctl_get_initindex(&msg->hdr.nexus);
 
 	mtx_lock(&softc->ctl_lock);
-	if (msg->hdr.nexus.targ_lun >= CTL_MAX_LUNS ||
+	if (msg->hdr.nexus.targ_mapped_lun >= CTL_MAX_LUNS ||
 	    (lun = softc->ctl_luns[msg->hdr.nexus.targ_mapped_lun]) == NULL) {
 		mtx_unlock(&softc->ctl_lock);
 		return;
@@ -1074,7 +1074,7 @@ ctl_isc_lun_sync(struct ctl_softc *softc
 	    memcmp(&msg->lun.data[0], lun->lun_devid->data, i) != 0)) {
 		mtx_unlock(&lun->lun_lock);
 		printf("%s: Received conflicting HA LUN %d\n",
-		    __func__, msg->hdr.nexus.targ_lun);
+		    __func__, targ_lun);
 		return;
 	} else {
 		/* Record whether peer is primary. */
@@ -1108,7 +1108,7 @@ ctl_isc_lun_sync(struct ctl_softc *softc
 
 		mtx_unlock(&lun->lun_lock);
 		CTL_DEBUG_PRINT(("%s: Known LUN %d, peer is %s\n",
-		    __func__, msg->hdr.nexus.targ_lun,
+		    __func__, targ_lun,
 		    (msg->lun.flags & CTL_LUN_PRIMARY_SC) ?
 		    "primary" : "secondary"));
 


More information about the svn-src-all mailing list