diff options
author | mav <mav@FreeBSD.org> | 2015-10-05 09:08:58 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-10-05 09:08:58 +0000 |
commit | d17612b5d04d7a92dac3120a609a6e0629a1b5a9 (patch) | |
tree | 38468765eb8188a44413a663e91351d984751290 /sys/cam | |
parent | 89e8995fe2d4a54327478d0665ca3aba3c8eede4 (diff) | |
download | FreeBSD-src-d17612b5d04d7a92dac3120a609a6e0629a1b5a9.zip FreeBSD-src-d17612b5d04d7a92dac3120a609a6e0629a1b5a9.tar.gz |
MFC r287748: Make TARGET RESET respect LUN mapping.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/ctl/ctl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 71ed27f..6a5c2f3 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -11338,6 +11338,7 @@ static int ctl_target_reset(struct ctl_softc *softc, union ctl_io *io, ctl_ua_type ua_type) { + struct ctl_port *port; struct ctl_lun *lun; int retval; @@ -11358,8 +11359,13 @@ ctl_target_reset(struct ctl_softc *softc, union ctl_io *io, retval = 0; mtx_lock(&softc->ctl_lock); - STAILQ_FOREACH(lun, &softc->lun_list, links) + port = softc->ctl_ports[io->io_hdr.nexus.targ_port]; + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (port != NULL && + ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; retval += ctl_lun_reset(lun, io, ua_type); + } mtx_unlock(&softc->ctl_lock); return (retval); |