diff options
author | Alexander Motin <mav@FreeBSD.org> | 2016-12-27 18:23:16 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2016-12-27 18:23:16 +0000 |
commit | ee5e44e076645354f0e8331f0d92d101942ac833 (patch) | |
tree | 4497b30fac2cf1c4eb8706d17a8004b5326989aa /sys/cam/ctl/ctl_frontend.c | |
parent | d0aa56451e41de257dee3a79a38945345b95d681 (diff) | |
download | src-ee5e44e076645354f0e8331f0d92d101942ac833.tar.gz src-ee5e44e076645354f0e8331f0d92d101942ac833.zip |
Decouple limits on number of LUNs per port and LUs per CTL.
Those two values are not directly related, so make them independent.
This does not change any limits immediately, but makes number of LUNs
per port controllable via tunable/sysctl kern.cam.ctl.lun_map_size.
After this change increasing CTL_MAX_LUNS should be pretty cheap,
and even making it tunable should be easy.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=310635
Diffstat (limited to 'sys/cam/ctl/ctl_frontend.c')
-rw-r--r-- | sys/cam/ctl/ctl_frontend.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cam/ctl/ctl_frontend.c b/sys/cam/ctl/ctl_frontend.c index 5c6fa05b6f30..97f4e0ba44b4 100644 --- a/sys/cam/ctl/ctl_frontend.c +++ b/sys/cam/ctl/ctl_frontend.c @@ -315,7 +315,7 @@ ctl_port_online(struct ctl_port *port) if (port->lun_enable != NULL) { if (port->lun_map) { - for (l = 0; l < CTL_MAX_LUNS; l++) { + for (l = 0; l < port->lun_map_size; l++) { if (ctl_lun_map_from_port(port, l) == UINT32_MAX) continue; @@ -359,7 +359,7 @@ ctl_port_offline(struct ctl_port *port) port->port_offline(port->onoff_arg); if (port->lun_disable != NULL) { if (port->lun_map) { - for (l = 0; l < CTL_MAX_LUNS; l++) { + for (l = 0; l < port->lun_map_size; l++) { if (ctl_lun_map_from_port(port, l) == UINT32_MAX) continue; |