freebsd-nq/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_commonkrpc.c
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
nfscl.h
nfsclstate.h
nfsdport.h
nfskpiport.h
nfsm_subs.h
nfsport.h nfsclient: Fix ReadDS/WriteDS/CommitDS nfsstats RPC counts for a NFSv3 DS 2021-03-02 14:18:23 -08:00
nfsproto.h
nfsrvcache.h
nfsrvstate.h
nfsv4_errstr.h
rpcv2.h
xdr_subs.h