freebsd-skq/sys/fs/nfs
Rick Macklem 5f742d3879 nfsv4 client: fix forced dismount when sleeping on nfsv4lck
During a recent NFSv4 testing event a test server caused a hang
where "umount -N" failed.  The renew thread was sleeping on "nfsv4lck"
and the "umount" was sleeping, waiting for the renew thread to
terminate.

This is the first of two patches that is hoped to fix the renew thread
so that it will terminate when "umount -N" is done on the mount.

nfsv4_lock() checks for forced dismount, but only after it wakes up
from msleep().  Without this patch, a wakeup() call was required.
This patch adds a 1second timeout on the msleep(), so that it will
wake up and see the forced dismount flag.  Normally a wakeup()
will occur in less than 1second, but if a premature return from
msleep() does occur, it will simply loop around and msleep() again.

While here, replace the nfsmsleep() wrapper that was used for portability
with the actual msleep() call and make the same change for nfsv4_getref().

MFC after:	2 weeks
2021-03-19 14:09:33 -07:00
..
nfs_commonacl.c nfs: Remove APPLESTATIC macro 2020-05-12 13:23:25 +00:00
nfs_commonkrpc.c Add a new "tlscertname" NFS mount option. 2020-12-23 13:42:55 -08:00
nfs_commonport.c Fix diroffdiroff, probably copy/paste bug. 2021-02-28 09:08:31 -05:00
nfs_commonsubs.c nfsv4 client: fix forced dismount when sleeping on nfsv4lck 2021-03-19 14:09:33 -07:00
nfs_var.h nfsv4 client: fix forced dismount when sleeping on nfsv4lck 2021-03-19 14:09:33 -07:00
nfs.h nfsd: fix NFSv4.0 seqid handling for ERELOOKUP 2021-01-01 14:21:51 -08:00
nfscl.h Delete the unused "use_ext" argument to nfscl_reqstart(). 2020-08-18 01:41:12 +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 Do not copy vp into f_data for DTYPE_VNODE files. 2020-09-15 21:55:21 +00:00
nfskpiport.h Remove vfs_statfs and vnode_mount macros from NFS 2020-06-17 16:20:19 +00:00
nfsm_subs.h fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
nfsport.h nfsclient: Fix ReadDS/WriteDS/CommitDS nfsstats RPC counts for a NFSv3 DS 2021-03-02 14:18:23 -08:00
nfsproto.h fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
nfsrvcache.h Replace all instances of the typedef mbuf_t with "struct mbuf *". 2020-04-17 21:17:51 +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 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