freebsd-dev/sys/fs/nfs
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
..
nfs_commonacl.c Drop unused 'p' argument to nfsv4_strtogid(). 2019-03-12 15:07:47 +00:00
nfs_commonkrpc.c Fix kernel handling of a NFSERR_MINORVERSMISMATCH NFSv4 server reply. 2019-12-08 00:06:00 +00:00
nfs_commonport.c Add support for NFSv4.2 to the NFS client and server. 2019-12-12 23:22:55 +00:00
nfs_commonsubs.c Add support for NFSv4.2 to the NFS client and server. 2019-12-12 23:22:55 +00:00
nfs_var.h Add support for NFSv4.2 to the NFS client and server. 2019-12-12 23:22:55 +00:00
nfs.h Add support for NFSv4.2 to the NFS client and server. 2019-12-12 23:22:55 +00:00
nfscl.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfsclstate.h Add support for NFSv4.2 to the NFS client and server. 2019-12-12 23:22:55 +00:00
nfsdport.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfskpiport.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfsm_subs.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
nfsport.h Add support for NFSv4.2 to the NFS client and server. 2019-12-12 23:22:55 +00:00
nfsproto.h Add support for NFSv4.2 to the NFS client and server. 2019-12-12 23:22:55 +00:00
nfsrvcache.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
nfsrvstate.h Fix the pNFS server's reporting of SpaceUsed (va_bytes). 2019-11-22 00:22:55 +00:00
nfsv4_errstr.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
rpcv2.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
xdr_subs.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00