HomeFreeBSD

nfsd: Disable the NFSv4.2 Allocate operation by default

Description

nfsd: Disable the NFSv4.2 Allocate operation by default

Some exported file systems, such as ZFS ones, cannot do VOP_ALLOCATE().
Since an NFSv4.2 server must either support the Allocate operation for
all file systems or not support it at all, define a sysctl called
vfs.nfsd.enable_v42allocate to enable the Allocate operation.
This sysctl is false by default and can only be set true if all
exported file systems (or all DSs for a pNFS server) can perform
VOP_ALLOCATE().

Unfortunately, there is no way to know if a ZFS file system will
be exported once the nfsd is operational, even if there are none
exported when the nfsd is started up, so enabling Allocate must
be done manually for a server configuration.

This problem was detected during a recent NFSv4 interoperability
testing event held by the IETF working group.

(cherry picked from commit dfe887b7d2265a5c6e0132cc03e006eb68223177)

Details

Provenance
rmacklemAuthored on Oct 11 2021, 1:46 AM
Parents
rG37a1501ed3dc: nfscl: Fix NFS VOP_ALLOCATE for mounts without Allocate support
Branches
Unknown
Tags
Unknown