freebsd-dev/sys/fs
Rick Macklem 82ee386c2a nfsv4 client: fix forced dismount when sleeping in the renew thread
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 second of two patches that is hoped to fix the renew thread
so that it will terminate when "umount -N" is done on the mount.

This patch adds a 5second timeout on the msleep()s and checks for
the forced dismount flag so that the renew thread will
wake up and see the forced dismount flag.  Normally a wakeup()
will occur in less than 5seconds, but if a premature return from
msleep() does occur, it will simply loop around and msleep() again.
The patch also adds the "mp" argument to nfsv4_lock() so that it
will return when the forced dismount flag is set.

While here, replace the nfsmsleep() wrapper that was used for portability
with the actual msleep() call.

MFC after:	2 weeks
2021-03-23 13:04:37 -07:00
..
autofs Ensure that dirent's d_off field is initialized 2021-01-03 11:50:31 -05:00
cd9660 Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
cuse Fix for loading cuse.ko via rc.d . Make sure we declare the cuse(3) 2020-10-23 08:44:53 +00:00
deadfs vn_open(): If the vnode is reclaimed during open(2), do not return error. 2021-02-12 03:02:20 +02:00
devfs Remove #define _KERNEL hacks from libprocstat 2021-02-21 11:38:21 +02:00
ext2fs ext2fs: clear write cluster tracking on truncation 2021-02-21 11:38:21 +02:00
fdescfs Convert remaining cap_rights_init users to cap_rights_init_one 2021-01-12 13:16:10 +00:00
fifofs fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
fuse fusefs: fix a dead store in fuse_vnop_advlock 2021-03-19 19:38:57 -06:00
mntfs Add a new "mntfs" pseudo file system which provides private device vnodes for 2020-03-06 18:41:37 +00:00
msdosfs Fix makefs bootstrap after d485c77f20 2021-02-22 17:55:45 +00:00
nfs nfsv4 client: fix forced dismount when sleeping on nfsv4lck 2021-03-19 14:09:33 -07:00
nfsclient nfsv4 client: fix forced dismount when sleeping in the renew thread 2021-03-23 13:04:37 -07:00
nfsserver nfsserver: use VOP_VPUT_PAIR(). 2021-02-12 03:02:21 +02:00
nullfs null_vput_pair(): release use reference on dvp earlier 2021-03-12 13:31:08 +02:00
procfs Close races in vm object chain traversal for unlock 2021-02-25 12:11:19 -08:00
pseudofs Add sbuf streaming mode to pseudofs(9), use in linprocfs(5) 2020-11-05 06:48:51 +00:00
smbfs Ensure that dirent's d_off field is initialized 2021-01-03 11:50:31 -05:00
tmpfs tmpfs: implement pathconf(_PC_SYMLINK_MAX) 2021-01-29 09:30:25 +00:00
udf Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
unionfs Split out cwd/root/jail, cmask state from filedesc table 2020-11-17 21:14:13 +00:00