Make acltype=nfsv4 the default on Linux, too
Now that we support NFSv4 ACLs on Linux, this can now be made the default across all platforms. Update the documentation and tests accordingly. Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
This commit is contained in:
parent
9290fb7361
commit
ab9a80865d
|
@ -660,23 +660,18 @@ platform, the behavior is the same as if it were set to
|
||||||
.Sy off .
|
.Sy off .
|
||||||
.Bl -tag -compact -offset 4n -width "posixacl"
|
.Bl -tag -compact -offset 4n -width "posixacl"
|
||||||
.It Sy off
|
.It Sy off
|
||||||
default on Linux, when a file system has the
|
when a file system has the
|
||||||
.Sy acltype
|
.Sy acltype
|
||||||
property set to off then ACLs are disabled.
|
property set to off then ACLs are disabled.
|
||||||
.It Sy noacl
|
.It Sy noacl
|
||||||
an alias for
|
an alias for
|
||||||
.Sy off
|
.Sy off
|
||||||
.It Sy nfsv4
|
.It Sy nfsv4
|
||||||
default on
|
default, indicates that NFSv4-style ZFS ACLs should be used.
|
||||||
.Fx ,
|
|
||||||
indicates that NFSv4-style ZFS ACLs should be used.
|
|
||||||
These ACLs can be managed with the
|
These ACLs can be managed with the
|
||||||
.Xr getfacl 1
|
.Xr getfacl 1
|
||||||
and
|
and
|
||||||
.Xr setfacl 1 .
|
.Xr setfacl 1 .
|
||||||
The
|
|
||||||
.Sy nfsv4
|
|
||||||
ZFS ACL type is not yet supported on Linux.
|
|
||||||
.It Sy posix
|
.It Sy posix
|
||||||
indicates POSIX ACLs should be used.
|
indicates POSIX ACLs should be used.
|
||||||
POSIX ACLs are specific to Linux and are not functional on other platforms.
|
POSIX ACLs are specific to Linux and are not functional on other platforms.
|
||||||
|
|
|
@ -436,13 +436,7 @@ zfs_prop_init(void)
|
||||||
PROP_INHERIT, ZFS_TYPE_FILESYSTEM,
|
PROP_INHERIT, ZFS_TYPE_FILESYSTEM,
|
||||||
"discard | groupmask | passthrough | restricted", "ACLMODE",
|
"discard | groupmask | passthrough | restricted", "ACLMODE",
|
||||||
acl_mode_table, sfeatures);
|
acl_mode_table, sfeatures);
|
||||||
zprop_register_index(ZFS_PROP_ACLTYPE, "acltype",
|
zprop_register_index(ZFS_PROP_ACLTYPE, "acltype", ZFS_ACLTYPE_NFSV4,
|
||||||
#ifdef __linux__
|
|
||||||
/* Linux doesn't natively support ZFS's NFSv4-style ACLs. */
|
|
||||||
ZFS_ACLTYPE_OFF,
|
|
||||||
#else
|
|
||||||
ZFS_ACLTYPE_NFSV4,
|
|
||||||
#endif
|
|
||||||
PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT,
|
PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT,
|
||||||
"off | nfsv4 | posix", "ACLTYPE", acltype_table, sfeatures);
|
"off | nfsv4 | posix", "ACLTYPE", acltype_table, sfeatures);
|
||||||
zprop_register_index(ZFS_PROP_ACLINHERIT, "aclinherit",
|
zprop_register_index(ZFS_PROP_ACLINHERIT, "aclinherit",
|
||||||
|
|
|
@ -27,11 +27,8 @@ props['checksum'] = {{'on', 'default'}, {nil, nil}}
|
||||||
props['dedup'] = {{'off', 'default'}, {nil, nil}}
|
props['dedup'] = {{'off', 'default'}, {nil, nil}}
|
||||||
props['compression'] = {{'off', 'default'}, {nil, nil}}
|
props['compression'] = {{'off', 'default'}, {nil, nil}}
|
||||||
props['snapdir'] = {{'hidden', 'default'}, {nil, nil}}
|
props['snapdir'] = {{'hidden', 'default'}, {nil, nil}}
|
||||||
if os == "Linux" then
|
props['acltype'] = {{'nfsv4', 'default'}, {'nfsv4', 'default'}}
|
||||||
props['acltype'] = {{'off', 'default'}, {'off', 'default'}}
|
props['aclmode'] = {{'discard', 'default'}, {'discard', 'default'}}
|
||||||
elseif os == "FreeBSD" then
|
|
||||||
props['aclmode'] = {{'discard', 'default'}, {'discard', 'default'}}
|
|
||||||
end
|
|
||||||
props['aclinherit'] = {{'restricted','default'}, {nil, nil}}
|
props['aclinherit'] = {{'restricted','default'}, {nil, nil}}
|
||||||
props['copies'] = {{'1', 'default'}, {nil, nil}}
|
props['copies'] = {{'1', 'default'}, {nil, nil}}
|
||||||
props['primarycache'] = {{'all', 'default'}, {'all', 'default'}}
|
props['primarycache'] = {{'all', 'default'}, {'all', 'default'}}
|
||||||
|
|
|
@ -62,13 +62,12 @@ typeset -r uint64_max="18446744073709551615"
|
||||||
typeset zfs_props=("type" used available creation volsize referenced \
|
typeset zfs_props=("type" used available creation volsize referenced \
|
||||||
compressratio mounted origin recordsize quota reservation mountpoint \
|
compressratio mounted origin recordsize quota reservation mountpoint \
|
||||||
sharenfs checksum compression atime devices exec readonly setuid \
|
sharenfs checksum compression atime devices exec readonly setuid \
|
||||||
snapdir aclinherit canmount primarycache secondarycache version \
|
snapdir aclinherit aclmode acltype canmount primarycache secondarycache \
|
||||||
usedbychildren usedbydataset usedbyrefreservation usedbysnapshots \
|
version usedbychildren usedbydataset usedbyrefreservation usedbysnapshots)
|
||||||
filesystem_limit snapshot_limit filesystem_count snapshot_count)
|
|
||||||
if is_freebsd; then
|
if is_freebsd; then
|
||||||
typeset zfs_props_os=(jailed aclmode)
|
typeset zfs_props_os=(jailed)
|
||||||
else
|
else
|
||||||
typeset zfs_props_os=(zoned acltype)
|
typeset zfs_props_os=(zoned)
|
||||||
fi
|
fi
|
||||||
typeset userquota_props=(userquota@root groupquota@root userused@root \
|
typeset userquota_props=(userquota@root groupquota@root userused@root \
|
||||||
groupused@root)
|
groupused@root)
|
||||||
|
|
|
@ -50,12 +50,12 @@ typeset options=(" " p r H)
|
||||||
typeset zfs_props=("type" used available creation volsize referenced \
|
typeset zfs_props=("type" used available creation volsize referenced \
|
||||||
compressratio mounted origin recordsize quota reservation mountpoint \
|
compressratio mounted origin recordsize quota reservation mountpoint \
|
||||||
sharenfs checksum compression atime devices exec readonly setuid \
|
sharenfs checksum compression atime devices exec readonly setuid \
|
||||||
snapdir aclinherit canmount primarycache secondarycache version \
|
snapdir aclinherit aclmode acltype canmount primarycache secondarycache \
|
||||||
usedbychildren usedbydataset usedbyrefreservation usedbysnapshots)
|
version usedbychildren usedbydataset usedbyrefreservation usedbysnapshots)
|
||||||
if is_freebsd; then
|
if is_freebsd; then
|
||||||
typeset zfs_props_os=(jailed aclmode)
|
typeset zfs_props_os=(jailed)
|
||||||
else
|
else
|
||||||
typeset zfs_props_os=(zoned acltype)
|
typeset zfs_props_os=(zoned)
|
||||||
fi
|
fi
|
||||||
typeset userquota_props=(userquota@root groupquota@root userused@root \
|
typeset userquota_props=(userquota@root groupquota@root userused@root \
|
||||||
groupused@root)
|
groupused@root)
|
||||||
|
|
|
@ -48,12 +48,12 @@ typeset val_opts=(p r H)
|
||||||
typeset v_props=(type used available creation volsize referenced compressratio \
|
typeset v_props=(type used available creation volsize referenced compressratio \
|
||||||
mounted origin recordsize quota reservation mountpoint sharenfs checksum \
|
mounted origin recordsize quota reservation mountpoint sharenfs checksum \
|
||||||
compression atime devices exec readonly setuid snapdir version \
|
compression atime devices exec readonly setuid snapdir version \
|
||||||
aclinherit canmount primarycache secondarycache \
|
aclinherit aclmode acltype canmount primarycache secondarycache \
|
||||||
usedbychildren usedbydataset usedbyrefreservation usedbysnapshots)
|
usedbychildren usedbydataset usedbyrefreservation usedbysnapshots)
|
||||||
if is_freebsd; then
|
if is_freebsd; then
|
||||||
typeset v_props_os=(jailed aclmode)
|
typeset v_props_os=(jailed)
|
||||||
else
|
else
|
||||||
typeset v_props_os=(zoned acltype)
|
typeset v_props_os=(zoned)
|
||||||
fi
|
fi
|
||||||
typeset userquota_props=(userquota@root groupquota@root userused@root \
|
typeset userquota_props=(userquota@root groupquota@root userused@root \
|
||||||
groupused@root)
|
groupused@root)
|
||||||
|
|
|
@ -53,13 +53,13 @@ set -A options " " "-r" "-H" "-p" "-rHp" "-o name" \
|
||||||
set -A props type used available creation volsize referenced compressratio \
|
set -A props type used available creation volsize referenced compressratio \
|
||||||
mounted origin recordsize quota reservation mountpoint sharenfs \
|
mounted origin recordsize quota reservation mountpoint sharenfs \
|
||||||
checksum compression atime devices exec readonly setuid snapdir \
|
checksum compression atime devices exec readonly setuid snapdir \
|
||||||
aclinherit canmount primarycache secondarycache version \
|
aclinherit aclmode acltype canmount primarycache secondarycache \
|
||||||
usedbychildren usedbydataset usedbyrefreservation usedbysnapshots \
|
usedbychildren usedbydataset usedbyrefreservation usedbysnapshots \
|
||||||
userquota@root groupquota@root userused@root groupused@root
|
userquota@root groupquota@root userused@root groupused@root
|
||||||
if is_freebsd; then
|
if is_freebsd; then
|
||||||
set -A props ${props[*]} jailed aclmode
|
set -A props ${props[*]} jailed
|
||||||
else
|
else
|
||||||
set -A props ${props[*]} zoned acltype
|
set -A props ${props[*]} zoned
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -A dataset $TESTPOOL/$TESTCTR $TESTPOOL/$TESTFS $TESTPOOL/$TESTVOL \
|
set -A dataset $TESTPOOL/$TESTCTR $TESTPOOL/$TESTFS $TESTPOOL/$TESTVOL \
|
||||||
|
|
|
@ -52,16 +52,16 @@ fi
|
||||||
log_assert "'zfs get -d <n>' should get expected output."
|
log_assert "'zfs get -d <n>' should get expected output."
|
||||||
log_onexit depth_fs_cleanup
|
log_onexit depth_fs_cleanup
|
||||||
|
|
||||||
set -A all_props type used available creation volsize referenced \
|
set -A all_props type used available creation volsize referenced compressratio \
|
||||||
compressratio mounted origin recordsize quota reservation mountpoint \
|
mounted origin recordsize quota reservation mountpoint sharenfs \
|
||||||
sharenfs checksum compression atime devices exec readonly setuid \
|
checksum compression atime devices exec readonly setuid snapdir \
|
||||||
snapdir aclinherit canmount primarycache secondarycache version \
|
aclinherit aclmode acltype canmount primarycache secondarycache \
|
||||||
usedbychildren usedbydataset usedbyrefreservation usedbysnapshots \
|
usedbychildren usedbydataset usedbyrefreservation usedbysnapshots \
|
||||||
userquota@root groupquota@root userused@root groupused@root
|
userquota@root groupquota@root userused@root groupused@root
|
||||||
if is_freebsd; then
|
if is_freebsd; then
|
||||||
set -A all_props ${all_props[*]} jailed aclmode
|
set -A all_props ${all_props[*]} jailed
|
||||||
else
|
else
|
||||||
set -A all_props ${all_props[*]} zoned acltype
|
set -A all_props ${all_props[*]} zoned
|
||||||
fi
|
fi
|
||||||
|
|
||||||
depth_fs_setup
|
depth_fs_setup
|
||||||
|
|
|
@ -373,6 +373,8 @@ function scan_state { #state-file
|
||||||
#
|
#
|
||||||
set -A prop "checksum" "" \
|
set -A prop "checksum" "" \
|
||||||
"compression" "" \
|
"compression" "" \
|
||||||
|
"aclmode" "" \
|
||||||
|
"acltype" "" \
|
||||||
"atime" "" \
|
"atime" "" \
|
||||||
"sharenfs" "" \
|
"sharenfs" "" \
|
||||||
"recordsize" "recsize" \
|
"recordsize" "recsize" \
|
||||||
|
@ -386,13 +388,21 @@ set -A prop "checksum" "" \
|
||||||
# above must have a corresponding entry in the two arrays below.
|
# above must have a corresponding entry in the two arrays below.
|
||||||
#
|
#
|
||||||
|
|
||||||
set -A def_val "on" "on" "on" \
|
set -A def_val "on" \
|
||||||
|
"on" \
|
||||||
|
"discard" \
|
||||||
|
"nfsv4" \
|
||||||
|
"on" \
|
||||||
"off" "" \
|
"off" "" \
|
||||||
"hidden" \
|
"hidden" \
|
||||||
"off" \
|
"off" \
|
||||||
"all"
|
"all"
|
||||||
|
|
||||||
set -A local_val "off" "off" "off" \
|
set -A local_val "off" \
|
||||||
|
"off" \
|
||||||
|
"groupmask" \
|
||||||
|
"off" \
|
||||||
|
"off" \
|
||||||
"on" "" \
|
"on" "" \
|
||||||
"visible" \
|
"visible" \
|
||||||
"off" \
|
"off" \
|
||||||
|
@ -401,15 +411,6 @@ set -A local_val "off" "off" "off" \
|
||||||
#
|
#
|
||||||
# Add system specific values
|
# Add system specific values
|
||||||
#
|
#
|
||||||
if is_linux; then
|
|
||||||
prop+=("acltype" "")
|
|
||||||
def_val+=("off")
|
|
||||||
local_val+=("off")
|
|
||||||
else
|
|
||||||
prop+=("aclmode" "")
|
|
||||||
def_val+=("discard")
|
|
||||||
local_val+=("groupmask")
|
|
||||||
fi
|
|
||||||
if is_illumos; then
|
if is_illumos; then
|
||||||
prop+=("mountpoint" "")
|
prop+=("mountpoint" "")
|
||||||
def_val+=("")
|
def_val+=("")
|
||||||
|
|
Loading…
Reference in New Issue