HomeFreeBSD

nfscl: Fix NFS VOP_ALLOCATE for mounts without Allocate support

Description

nfscl: Fix NFS VOP_ALLOCATE for mounts without Allocate support

Without this patch, nfs_allocate() fell back on using vop_stdallocate()
for NFS mounts without Allocate operation support. This was incorrect,
since some file systems, such as ZFS, cannot do allocate via
vop_stdallocate(), which uses writes to try and allocate blocks.

Also, fix nfs_allocate() to return EINVAL when mounts cannot do Allocate,
since that is the correct error for posix_fallocate(2).
Note that Allocate is only supported by some NFSv4.2 servers.

MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on Oct 10 2021, 9:27 PM
Parents
rGe81e77c5a055: Enable PPS_SYNC on amd64, arm64 and armv7
Branches
Unknown
Tags
Unknown