freebsd-dev/sys
Konstantin Belousov 4cda7f7ece 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
..
amd64 Invoke the DTrace trap handler before calling trap() on amd64. This matches 2014-07-14 04:38:17 +00:00
arm Pending interrupt status is cleared by writing to the ISR, not the data reg. 2014-07-10 14:06:18 +00:00
boot Compile boot2 with clang on pc98. 2014-07-10 00:15:50 +00:00
bsm IFp4 @1192291: 2014-04-07 20:44:00 +00:00
cam Merge several equal serialization indexes. 2014-07-13 06:01:23 +00:00
cddl Invoke the DTrace trap handler before calling trap() on amd64. This matches 2014-07-14 04:38:17 +00:00
compat All mbuf external free functions never fail, so let them be void. 2014-07-11 13:58:48 +00:00
conf Remove ia64. 2014-07-07 00:27:09 +00:00
contrib Remove redundant USE_INET6 test that enables INET6 in the ipfilter userland 2014-07-11 16:26:51 +00:00
crypto Put the aesni_cipher_setup() and aesni_cipher_process() functions into 2014-06-24 06:55:49 +00:00
ddb handle longer commands so that lines don't overflow... people who added 2014-06-02 23:50:19 +00:00
dev Add a headphone redirection quirk for the Lenovo G580. 2014-07-13 10:31:29 +00:00
fs Rework the tmpfs unmount. 2014-07-14 09:52:33 +00:00
gdb Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
geom After EFI support was added to the installer, it needed to allow boot 2014-07-04 15:55:32 +00:00
gnu Symbolic bindings for the dts files... 2014-02-28 16:51:33 +00:00
i386 Invoke the DTrace trap handler before calling trap() on amd64. This matches 2014-07-14 04:38:17 +00:00
isa Remove vestiges of knowing the ISA bus, which we gave up on around 20 2014-03-19 21:03:04 +00:00
kern Extract the code to put a filesystem into the suspended state (at the 2014-07-14 09:10:00 +00:00
kgssapi
libkern Remove ia64. 2014-07-07 00:27:09 +00:00
mips Invoke the DTrace trap handler before calling trap() on amd64. This matches 2014-07-14 04:38:17 +00:00
modules Remove ia64. 2014-07-07 00:27:09 +00:00
net Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
net80211 Use logical rather than bitwise OR in if() expression. 2014-04-26 23:22:49 +00:00
netgraph Remove any stale mbuf tags from packets being injected into a netgraph 2014-07-01 07:54:12 +00:00
netinet Add RSS hashing awareness for IPv6 and TCP IPv6 hash types. 2014-07-12 05:43:43 +00:00
netinet6 Add IPv6 flowid, bindmulti and RSS awareness. 2014-07-12 05:46:33 +00:00
netipsec Fix style bug: rename the refcount field of m_ext to ext_cnt, to match 2014-07-11 14:34:29 +00:00
netnatm
netpfil On machines with strict alignment copy pfsync_state_key from packet 2014-07-10 12:41:58 +00:00
netsmb Remove redundant unlock. 2014-04-17 12:22:08 +00:00
nfs Fix/improve fhe_stats sysctl output. 2014-06-14 12:26:12 +00:00
nfsclient
nfsserver Change NFS readdir() to only ignore cookies preceding the given offset for 2014-07-01 20:00:35 +00:00
nlm Correct a typo in nlm_find_host_by_addr(): the intention of the 2014-03-11 00:25:55 +00:00
ofed Fix OFED startup order: All SYSINIT()'s and modules should be loaded 2014-07-06 14:22:13 +00:00
opencrypto allow the kern.cryptodevallowsoft sysctl to enable symetric/hashes too... 2014-03-11 01:45:46 +00:00
pc98 Compile fixes: 2014-06-28 17:36:18 +00:00
pci Fix various NIC drivers to properly cleanup static DMA resources. 2014-06-11 14:53:58 +00:00
powerpc Invoke the DTrace trap handler before calling trap() on amd64. This matches 2014-07-14 04:38:17 +00:00
rpc Merge the NFSv4.1 server code in projects/nfsv4.1-server over 2014-07-01 20:47:16 +00:00
security Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
sparc64 Introduce pmap_unwire(). It will replace pmap_change_wiring(). There are 2014-07-06 17:42:38 +00:00
sys Extract the code to put a filesystem into the suspended state (at the 2014-07-14 09:10:00 +00:00
teken Fix typo. 2014-02-06 13:28:06 +00:00
tools Call cpp with -P to avoid printing line markings. 2014-06-10 06:24:01 +00:00
ufs Extract the code to put a filesystem into the suspended state (at the 2014-07-14 09:10:00 +00:00
vm The OBJ_TMPFS flag of vm_object means that there is unreclaimed tmpfs 2014-07-14 09:30:37 +00:00
x86 Remove ia64. 2014-07-07 00:27:09 +00:00
xdr
xen Remove ia64. 2014-07-07 00:27:09 +00:00
Makefile Remove ia64. 2014-07-07 00:27:09 +00:00