diff options
author | Alexander Motin <mav@FreeBSD.org> | 2016-12-26 08:47:35 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2016-12-26 08:47:35 +0000 |
commit | 92efdd43056e80c51b6f142f2b297da896c3888b (patch) | |
tree | 93a77a971bf4e2f6d65d74c89bdb9fdf44a136a6 /sys/cam/ctl/ctl.c | |
parent | 0327a0e823fedd523566bb3c847fd62c954dc684 (diff) | |
download | src-92efdd43056e80c51b6f142f2b297da896c3888b.tar.gz src-92efdd43056e80c51b6f142f2b297da896c3888b.zip |
Fix improperly used nexus.targ_lun.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=310575
Diffstat (limited to 'sys/cam/ctl/ctl.c')
-rw-r--r-- | sys/cam/ctl/ctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index f0894c9b19ff..502aca27775a 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -1024,7 +1024,7 @@ ctl_isc_ua(struct ctl_softc *softc, union ctl_ha_msg *msg, int len) 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, union ctl_ha_msg *msg, int len) 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, union ctl_ha_msg *msg, int len) 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")); |