nfs_clvnops: standardize on EOPNOTSUPP for posix_fallocate(2)
POSIX Issue 7 had allowed EINVAL for this case, but issue 8 moves it to ENOTSUP instead. ZFS uses the latter and we have some software in ports already that's wanting to use that to detect the filesystem not supporting it, so let's standardize on it. Reviewed by: imp, kib, rmacklem Differential Revision: https://reviews.freebsd.org/D53536
This commit is contained in:
@@ -3896,11 +3896,15 @@ nfs_allocate(struct vop_allocate_args *ap)
|
||||
mtx_lock(&nmp->nm_mtx);
|
||||
nmp->nm_privflag |= NFSMNTP_NOALLOCATE;
|
||||
mtx_unlock(&nmp->nm_mtx);
|
||||
error = EINVAL;
|
||||
error = EOPNOTSUPP;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* Pre-v4.2 NFS server that doesn't support it, or a newer
|
||||
* NFS server that has indicated that it doesn't support it.
|
||||
*/
|
||||
mtx_unlock(&nmp->nm_mtx);
|
||||
error = EINVAL;
|
||||
error = EOPNOTSUPP;
|
||||
}
|
||||
if (attrflag != 0) {
|
||||
ret = nfscl_loadattrcache(&vp, &nfsva, NULL, 0, 1);
|
||||
|
||||
Reference in New Issue
Block a user