freebsd-skq/sys/fs
Rick Macklem c057a37818 Add support for NFSv4.2 to the NFS client and server.
This patch adds support for NFSv4.2 (RFC-7862) and Extended Attributes
(RFC-8276) to the NFS client and server.
NFSv4.2 is comprised of several optional features that can be supported
in addition to NFSv4.1. This patch adds the following optional features:
   - posix_fadvise(POSIX_FADV_WILLNEED/POSIX_FADV_DONTNEED)
   - posix_fallocate()
   - intra server file range copying via the copy_file_range(2) syscall
     --> Avoiding data tranfer over the wire to/from the NFS client.
   - lseek(SEEK_DATA/SEEK_HOLE)
   - Extended attribute syscalls for "user" namespace attributes as defined
     by RFC-8276.

Although this patch is fairly large, it should not affect support for
the other versions of NFS. However it does add two new sysctls that allow
a sysadmin to limit which minor versions of NFSv4 a server supports, allowing
a sysadmin to disable NFSv4.2.

Unfortunately, when the NFS stats structure was last revised, it was assumed
that there would be no additional operations added beyond what was
specified in RFC-7862. However RFC-8276 did add additional operations,
forcing the NFS stats structure to revised again. It now has extra unused
entries in all arrays, so that future extensions to NFSv4.2 can be
accomodated without revising this structure again.

A future commit will update nfsstat(1) to report counts for the new NFSv4.2
specific operations/procedures.

This patch affects the internal interface between the nfscommon, nfscl and
nfsd modules and, as such, they all must be upgraded simultaneously.
I will do a version bump (although arguably not needed), due to this.

This code has survived a "make universe" but has not been built with a
recent GCC. If you encounter build problems, please email me.

Relnotes:	yes
2019-12-12 23:22:55 +00:00
..
autofs vfs: introduce v_irflag and make v_type smaller 2019-12-08 21:30:04 +00:00
cd9660 vfs: introduce v_irflag and make v_type smaller 2019-12-08 21:30:04 +00:00
cuse Free all allocated unit IDs in cuse(3) after the client character 2019-06-25 11:46:01 +00:00
deadfs Switch to use shared vnode locks for text files during image activation. 2019-05-05 11:20:43 +00:00
devfs vfs: introduce v_irflag and make v_type smaller 2019-12-08 21:30:04 +00:00
ext2fs vfs: introduce v_irflag and make v_type smaller 2019-12-08 21:30:04 +00:00
fdescfs vfs: introduce v_irflag and make v_type smaller 2019-12-08 21:30:04 +00:00
fifofs fcntl: fix overflow when setting F_READAHEAD 2019-06-20 23:07:20 +00:00
fuse vfs: introduce v_irflag and make v_type smaller 2019-12-08 21:30:04 +00:00
msdosfs Plug the rest of undef behavior places that were missed in r337456. 2019-10-11 18:37:02 +00:00
nfs Add support for NFSv4.2 to the NFS client and server. 2019-12-12 23:22:55 +00:00
nfsclient Add support for NFSv4.2 to the NFS client and server. 2019-12-12 23:22:55 +00:00
nfsserver Add support for NFSv4.2 to the NFS client and server. 2019-12-12 23:22:55 +00:00
nullfs vfs: introduce v_irflag and make v_type smaller 2019-12-08 21:30:04 +00:00
procfs Define macro VM_MAP_ENTRY_FOREACH for enumerating the entries in a vm_map. 2019-10-08 07:14:21 +00:00
pseudofs vfs: introduce v_irflag and make v_type smaller 2019-12-08 21:30:04 +00:00
smbfs vfs: introduce v_irflag and make v_type smaller 2019-12-08 21:30:04 +00:00
tmpfs vfs: locking primitives which elide ->v_vnlock and shared locking disablement 2019-12-11 23:11:21 +00:00
udf Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
unionfs vfs: introduce v_irflag and make v_type smaller 2019-12-08 21:30:04 +00:00