freebsd-dev/sys/fs/nfs
Rick Macklem 981ef32230 nfscl: Enable detection of bad session slots
To deal with broken session slots caused by the use of the
"soft" and/or "intr" mount options, nfsv4_sequencelookup()
has been modified to track the potentially broken session
slots (commit 40ada74ee1).  Then, when all session slots
are potentially broken, nfsv4_sequencelookup() does a
DeleteSession operation, so that the NFSv4.1/4.2 server will
reply NFSERR_BADSESSION to uses of the session.
The client will then recover by doing a CreateSession to
acquire a new session.

This patch adds the code that marks potentially bad
slots, so that the above semantics become functional.
It has been successfully tested against a FreeBSD
NFSv4.1/4.2 server, but does not work against a Linux 5.15
NFSv4.1/4.2 server. (The Linux 5.15 server creates
a new session with the same sessionid as the destroyed
one and, as such, keeps returning NFSERR_BADSESSION.
I believe this is a bug in the Linux server.)

However, this should not cause a regression and will
make "intr" mounts fairly usable against the NFSv4.1/4.2
servers where it works.

PR: 260011
MFC after:	2 weeks
2022-07-10 13:33:19 -07:00
..
nfs_commonacl.c nfsd: Do not accept audit/alarm ACEs for the NFSv4 server 2022-01-11 09:40:07 -08:00
nfs_commonkrpc.c nfscl: Enable detection of bad session slots 2022-07-10 13:33:19 -07:00
nfs_commonport.c nfscl: Add support for a NFSv4 AppendWrite RPC 2022-04-05 08:11:37 -07:00
nfs_commonsubs.c nfscl: Add optional support for slots marked bad 2022-07-09 14:43:16 -07:00
nfs_var.h nfscl: Add optional support for slots marked bad 2022-07-09 14:43:16 -07:00
nfs.h nfsd: Add a sanity check for Owner/OwnerGroup string length 2022-05-04 13:58:22 -07:00
nfscl.h nfscl: Add a cred argument to nfscl_reqstart() 2022-07-08 16:58:06 -07:00
nfsclstate.h nfscl: Add optional support for slots marked bad 2022-07-09 14:43:16 -07:00
nfsdport.h Do not copy vp into f_data for DTYPE_VNODE files. 2020-09-15 21:55:21 +00:00
nfskpiport.h nfscommon: Clean up the code by removing the vnode_vtype() macro 2022-06-24 13:56:35 -07:00
nfsm_subs.h nfscl: Clean up the code by removing #if(n)def APPLE 2022-06-18 13:43:02 -07:00
nfsport.h nfscl: Clean up the code by removing unused arguments 2022-04-13 07:43:13 -07:00
nfsproto.h Unbreak the build: Also define NFSV42_OLDNPROCS here. 2022-04-05 11:54:20 -06:00
nfsrvcache.h Replace all instances of the typedef mbuf_t with "struct mbuf *". 2020-04-17 21:17:51 +00:00
nfsrvstate.h nfsd: Fix the NFSv4.2 pNFS MDS server for NFSERR_NOSPC via LayoutError 2021-11-08 15:58:00 -08:00
nfsv4_errstr.h Add missing comma in nfsv4_errstr 2020-01-13 21:49:27 +00:00
rpcv2.h fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
xdr_subs.h nfs: don't truncate directory cookies to 32-bits in the NFS server 2021-12-15 20:54:57 -07:00