Bug 265893 - ZFS mount show nfsv4acls although pool/dataset is created with acltype=off
Summary: ZFS mount show nfsv4acls although pool/dataset is created with acltype=off
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-17 03:40 UTC by clear.screen
Modified: 2022-08-29 08:31 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description clear.screen 2022-08-17 03:40:32 UTC
When creating a pool and root dataset with following properties
acltype=off
xattr=sa
aclmode=discard (default)
aclinherit=restricted (default)

with following command
# cd /tmp
# truncate -s 1G 1.raw
# zpool create -O acltype=off -O xattr=sa test /tmp/1.raw

we have
# zfs get all | grep acl
  test    aclmode               discard                default
  test    aclinherit            restricted             default
  test    acltype               off                    local

but mount (with zfs automounter) reports
test on /test (zfs, local, nfsv4acls)

and in test doing following commands

# touch filetest
# getfacl filetest

gives 
# file: filetest
# owner: root
# group: wheel
getfacl: filetest: Invalid argument

1) confirm that the system is working correctly although the mount status seems to be wrong
2) if so, correct mount acl status
Comment 1 Allan Jude freebsd_committer freebsd_triage 2022-08-21 00:00:19 UTC
in sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c:zfs_mount()

it sets the nfs4v ACLs flag unconditionally:

vfsp->vfs_flag |= MNT_NFS4ACLS;

It should probably only do this if the aclmode is set.

This looks like maybe it should move to zfs_domount() along with case sensitivity etc.