freebsd-skq/sys/fs
kib 7eb2d27b75 Rework the tmpfs unmount.
- Suspend filesystem for unmount.  This prevents new tmpfs nodes from
  instantiating, and also ensures that only unmount thread can destroy
  nodes.

- Do not start tmpfs node deletion until all vnodes are reclaimed,
  which guarantees that no thread can access tmpfs data.  For this,
  call vflush() in the loop, until the mnt_nvnodelistsize is non-zero.
  Note that after mnt_nvnodelistsize becomes 0, insmntque() blocks
  insertion of a vnode germ into the mount list of vnodes.

- Fail node allocation when the filesystem is being unmounted.  This
  is race-free due to the vflush() call in loop.  This is mostly
  cosmetic, avoiding some more work which might be done until
  suspension in unmount is started.

Note that there is currently no way to prevent new vnode instantiation
from readers during the unmount.  Due to this, forced unmount might
live-lock if vflush() loop cannot get to the zero vnode count due to
races with readers.  The unmount would proceed after the load is
lifted.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-07-14 09:52:33 +00:00
..
cd9660 Generalize vn_get_ino() to allow filesystems to use custom vnode 2014-07-14 08:34:54 +00:00
cuse
deadfs
devfs
ext2fs
fdescfs
fifofs
fuse
msdosfs Generalize vn_get_ino() to allow filesystems to use custom vnode 2014-07-14 08:34:54 +00:00
nandfs Naughty NANDFS was using hidden unused flag, hiding the fact that the 2014-07-07 23:21:07 +00:00
nfs
nfsclient
nfsserver The new NFSv3 server did not generate directory postop attributes for 2014-07-04 22:47:07 +00:00
nullfs
procfs
pseudofs
smbfs
tmpfs Rework the tmpfs unmount. 2014-07-14 09:52:33 +00:00
udf
unionfs