opnsense-src/sys/fs/nfsserver
Rick Macklem 748f56c53f nfsd: Add a sysctl to limit NFSv4.2 Copy RPC size
NFSv4.2 supports a Copy operation, which avoids file data being
read to the client and then written back to the server, if both
input and output files are on the same NFSv4.2 mount for
copy_file_range(2).

Unfortunately, this Copy operation can take a long time under
certain circumstances.  If this occurs concurrently with a RPC
that requires an exclusive lock on the nfsd such as ExchangeID
done for a new mount, the result can be an nfsd "stall" until
the Copy completes.

This patch adds a sysctl that can be set to limit the size of
a Copy operation or, if set to 0, disable Copy operations.

The use of this sysctl and other ways to avoid Copy operations
taking too long will be documented in the nfsd.4 man page by
a separate commit.

MFC after:	2 weeks
2024-03-15 18:04:37 -07:00
..
nfs_fha_new.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
nfs_fha_new.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
nfs_nfsdcache.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nfs_nfsdkrpc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nfs_nfsdport.c Add vnode_pager_clean_{a,}sync(9) 2024-01-11 18:44:53 +02:00
nfs_nfsdserv.c nfsd: Add a sysctl to limit NFSv4.2 Copy RPC size 2024-03-15 18:04:37 -07:00
nfs_nfsdsocket.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nfs_nfsdstate.c nfsd: Fix NFSv4.1/4.2 Claim_Deleg_Cur_FH 2023-10-19 12:35:35 -07:00
nfs_nfsdsubs.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00