diff options
author | Marcelo Araujo <araujo@FreeBSD.org> | 2018-05-10 03:50:20 +0000 |
---|---|---|
committer | Marcelo Araujo <araujo@FreeBSD.org> | 2018-05-10 03:50:20 +0000 |
commit | 8951f05525ee4e9a93cc568dccd154405aae7419 (patch) | |
tree | 503e8ca76afeb0231224fd5f2522663ca24ca5f6 /usr.sbin/ctld/Makefile | |
parent | 3429b518c9bfbce5a16d76949d75a843567ba2de (diff) | |
download | src-8951f05525ee4e9a93cc568dccd154405aae7419.tar.gz src-8951f05525ee4e9a93cc568dccd154405aae7419.zip |
Rework CTL frontend & backend options to use nv(3), allow creating multiple
ioctl frontend ports.
This revision introduces two changes to CTL:
- Changes the way options are passed to CTL_LUN_REQ and CTL_PORT_REQ ioctls.
Removes ctl_be_arg structure and associated logic and replaces it with
nv(3)-based logic for passing in and out arguments.
- Allows creating multiple ioctl frontend ports using either ctladm(8) or
ctld(8).
New frontend ports are represented by /dev/cam/ctl<pp>.<vp> nodes, eg /dev/cam/ctl5.3.
Those device nodes respond only to CTL_IO ioctl.
New command-line options for ctladm:
# creates new ioctl frontend port with using free pp and vp=0
ctladm port -c
# creates new ioctl frontend port with pp=10 and vp=0
ctladm port -c -O pp=10
# creates new ioctl frontend port with pp=11 and vp=12
ctladm port -c -O pp=11 -O vp=12
# removes port with number 4 (it's a "targ_port" number, not pp number)
ctladm port -r -p 4
New syntax for ctl.conf:
target ... {
port ioctl/<pp>
...
}
target ... {
port ioctl/<pp>/<vp>
...
Note: Most of this work was made by jceel@, thank you.
Submitted by: jceel
Reworked by: myself
Reviewed by: mav (earlier versions and recently during the rework)
Obtained from: FreeNAS and TrueOS
Relnotes: Yes
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D9299
Notes
Notes:
svn path=/head/; revision=333446
Diffstat (limited to 'usr.sbin/ctld/Makefile')
-rw-r--r-- | usr.sbin/ctld/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/ctld/Makefile b/usr.sbin/ctld/Makefile index 944b94d663c8..2d13099c7a9a 100644 --- a/usr.sbin/ctld/Makefile +++ b/usr.sbin/ctld/Makefile @@ -15,7 +15,7 @@ CFLAGS+= -I${SRCTOP}/sys/dev/iscsi #CFLAGS+= -DICL_KERNEL_PROXY MAN= ctld.8 ctl.conf.5 -LIBADD= bsdxml l md sbuf util ucl m +LIBADD= bsdxml l md sbuf util ucl m nv YFLAGS+= -v CLEANFILES= y.tab.c y.tab.h y.output |