]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r278037: CTL LUN mapping rewrite.
authormav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 19 Feb 2015 14:31:16 +0000 (14:31 +0000)
committermav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 19 Feb 2015 14:31:16 +0000 (14:31 +0000)
commit8bdcddb24289e11c4f9b6bf4f7ba01e3654debf2
tree282042eb15012260f41a76a3f6a645a80bd3d224
parent7e995f9c9825ce90b2693e7974c0224031b36809
MFC r278037: CTL LUN mapping rewrite.

Replace iSCSI-specific LUN mapping mechanism with new one, working for any
ports.  By default all ports are created without LUN mapping, exposing all
CTL LUNs as before.  But, if needed, LUN mapping can be manually set on
per-port basis via ctladm.  For its iSCSI ports ctld does it via ioctl(2).
The next step will be to teach ctld to work with FibreChannel ports also.

Respecting additional flexibility of the new mechanism, ctl.conf now allows
alternative syntax for LUN definition.  LUNs can now be defined in global
context, and then referenced from targets by unique name, as needed.  It
allows same LUN to be exposed several times via multiple targets.

While there, increase limit for LUNs per target in ctld from 256 to 1024.
Some initiators do not support LUNs above 255, but that is not our problem.

Relnotes: yes
Sponsored by: iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@279002 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
15 files changed:
sys/cam/ctl/ctl.c
sys/cam/ctl/ctl_frontend.c
sys/cam/ctl/ctl_frontend.h
sys/cam/ctl/ctl_frontend_iscsi.c
sys/cam/ctl/ctl_frontend_iscsi.h
sys/cam/ctl/ctl_ioctl.h
sys/cam/ctl/ctl_private.h
sys/cam/ctl/ctl_tpc_local.c
usr.sbin/ctladm/ctladm.8
usr.sbin/ctladm/ctladm.c
usr.sbin/ctld/ctl.conf.5
usr.sbin/ctld/ctld.c
usr.sbin/ctld/ctld.h
usr.sbin/ctld/kernel.c
usr.sbin/ctld/parse.y