freebsd-skq/sys/fs
rmacklem 396df4f3c4 Add kernel support for the NFS client forced dismount "umount -N" option.
When an NFS mount is hung against an unresponsive NFS server, the "umount -f"
option can be used to dismount the mount. Unfortunately, "umount -f" gets
hung as well if a "umount" without "-f" has already been done. Usually,
this is because of a vnode lock being held by the "umount" for the mounted-on
vnode.
This patch adds kernel code so that a new "-N" option can be added to "umount",
allowing it to avoid getting hung for this case.
It adds two flags. One indicates that a forced dismount is about to happen
and the other is used, along with setting mnt_data == NULL, to handshake
with the nfs_unmount() VFS call.
It includes a slight change to the interface used between the client and
common NFS modules, so I bumped __FreeBSD_version to ensure both modules are
rebuilt.

Tested by:	pho
Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D11735
2017-07-29 19:52:47 +00:00
..
autofs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
cd9660 Consistently use vop_stdpathconf() for default pathconf values. 2017-07-11 21:55:20 +00:00
cuse Minor code optimisation. 2017-05-31 21:05:24 +00:00
deadfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
devfs Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
ext2fs Consistently use vop_stdpathconf() for default pathconf values. 2017-07-11 21:55:20 +00:00
fdescfs Replace unnecessary _KERNEL by double-include protection. 2017-07-25 06:59:35 +00:00
fifofs Consistently use vop_stdpathconf() for default pathconf values. 2017-07-11 21:55:20 +00:00
fuse Complete support for IO_APPEND flag in fuse 2017-06-28 13:56:15 +00:00
msdosfs Consistently use vop_stdpathconf() for default pathconf values. 2017-07-11 21:55:20 +00:00
nandfs Consistently use vop_stdpathconf() for default pathconf values. 2017-07-11 21:55:20 +00:00
nfs Add kernel support for the NFS client forced dismount "umount -N" option. 2017-07-29 19:52:47 +00:00
nfsclient Add kernel support for the NFS client forced dismount "umount -N" option. 2017-07-29 19:52:47 +00:00
nfsserver Rename vfs.nfsd.enable_uidtostring to vfs.nfs.enable_uidtostring. 2017-07-19 09:59:32 +00:00
nullfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
procfs remove procfs ctl interface 2017-03-05 03:05:24 +00:00
pseudofs Fix LINT, broken by a -Wformat warning in r320329 with PFS_DELEN being 2017-06-27 17:01:46 +00:00
smbfs Mark pages after EOF as clean after pageout. 2017-07-26 20:07:05 +00:00
tmpfs Consistently use vop_stdpathconf() for default pathconf values. 2017-07-11 21:55:20 +00:00
udf On error, bread(9) zeroes buffer pointer, do not dereference it. 2016-11-22 13:24:57 +00:00
unionfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00