svn commit: r312575 - stable/10/sys/cam/ctl
Alexander Motin
mav at FreeBSD.org
Sat Jan 21 08:32:57 UTC 2017
Author: mav
Date: Sat Jan 21 08:32:56 2017
New Revision: 312575
URL: https://svnweb.freebsd.org/changeset/base/312575
Log:
MFC r310575: Fix improperly used nexus.targ_lun.
Modified:
stable/10/sys/cam/ctl/ctl.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cam/ctl/ctl.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl.c Sat Jan 21 08:32:27 2017 (r312574)
+++ stable/10/sys/cam/ctl/ctl.c Sat Jan 21 08:32:56 2017 (r312575)
@@ -1026,7 +1026,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;
@@ -1076,7 +1076,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. */
@@ -1110,7 +1110,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