]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfsd: Disable the NFSv4.2 Allocate operation by default
authorRick Macklem <rmacklem@FreeBSD.org>
Mon, 11 Oct 2021 01:46:02 +0000 (18:46 -0700)
committerRick Macklem <rmacklem@FreeBSD.org>
Mon, 11 Oct 2021 01:46:02 +0000 (18:46 -0700)
commitdfe887b7d2265a5c6e0132cc03e006eb68223177
tree8bce5b34268c0f8b9be2db8a35ce811a30a939a4
parent235891a1273d99b86784f935d2d6c554ce189559
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.

MFC after: 2 weeks
sys/fs/nfsserver/nfs_nfsdserv.c