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.

(cherry picked from commit 235891a1273d99b86784f935d2d6c554ce189559)

Details

Provenance
rmacklemAuthored on Oct 10 2021, 9:27 PM
Parents
rGdcb72294601a: camcontrol(8): Clean up references to removed symbols
Branches
Unknown
Tags
Unknown