freebsd-nq/sys
Konstantin Belousov 8d6884ce9c When the journaled FFS volume is suspended due to the journal space
becoming too low, the softdep flush thread processes the workitems,
which frees the space in journal, and then unsuspends the fs.  The
softdep_flush() and other workitem processing functions busy the
filesystem before iterating over the worklist, to prevent the parallel
unmount from freeing the mount data. The vfs_busy() is called with
MBF_NOWAIT flag.

Now, if the unmount is already started and the filesystem is suspended
due to low journal space, the journal is never flushed and filesystem
is never unsuspended, because vfs_busy(MBF_NOWAIT) call cannot succeed
for the unmounting fs, and softdep_flush() does not process the
workitems. Unmount needs to write metadata, where it hangs in the
"suspfs" state.

Move the vn_start_write() call in the dounmount() before setting the
MNTK_UNMOUNT flag. This practically ensures that softdep_flush()
processed the pending journal writes by making dounmount() wait for
the lift of the suspension.

Sponsored by:	The FreeBSD Foundation
Reported and tested by:	pho
MFC after:	2 weeks
2013-03-20 21:07:49 +00:00
..
amd64 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
arm Integrate Efika MX project back to home. 2013-03-20 15:39:27 +00:00
boot Integrate Efika MX project back to home. 2013-03-20 15:39:27 +00:00
bsm
cam Commit the removal of a whitespace to record the proper commit message 2013-03-19 15:05:21 +00:00
cddl Plug memory leak in dsl_check_snap_cb() 2013-03-19 07:47:51 +00:00
compat Use m_get/m_gethdr instead of compat macros. 2013-03-15 12:55:30 +00:00
conf Sync back vmcontention branch into HEAD: 2013-03-18 00:25:02 +00:00
contrib
crypto
ddb
dev Integrate Efika MX project back to home. 2013-03-20 15:39:27 +00:00
fs Fix remainder calculation when biosize is not a power of 2 2013-03-19 13:06:11 +00:00
gdb
geom The geom_part provider supports unmapped bio iff the underlying 2013-03-19 14:50:24 +00:00
gnu/fs/reiserfs
i386 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
ia64 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
isa
kern When the journaled FFS volume is suspended due to the journal space 2013-03-20 21:07:49 +00:00
kgssapi
libkern Add __aeabi_memset to libkern, implemented using memset, as clang may 2013-03-16 23:11:55 +00:00
mips Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
modules Fix the powerpc64 build. MACHINE_CPUARCH is common for powerpc/powerpc64, 2013-03-19 00:39:02 +00:00
net Fix style and comments. 2013-03-19 05:51:47 +00:00
net80211 Add VNET wrappers around the rest of the ieee80211 rtsock messages. 2013-03-20 02:42:52 +00:00
netatalk
netgraph
netinet Add ipfw support for setting/matching DiffServ codepoints (DSCP). 2013-03-20 10:35:33 +00:00
netinet6 - Use m_getcl() instead of hand allocating. 2013-03-15 13:48:53 +00:00
netipsec Use m_get2() + m_align() instead of hand made key_alloc_mbuf(). Code 2013-03-15 10:20:15 +00:00
netipx
netnatm
netpfil Add ipfw support for setting/matching DiffServ codepoints (DSCP). 2013-03-20 10:35:33 +00:00
netsmb
nfs Use m_get() and m_getcl() instead of compat macros. 2013-03-15 10:21:18 +00:00
nfsclient Fix remainder calculation when biosize is not a power of 2 2013-03-19 13:06:11 +00:00
nfsserver
nlm
ofed
opencrypto
pc98
pci
powerpc Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
rpc
security
sparc64 Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
sys When renaming a directory from one parent directory to another, 2013-03-20 17:57:00 +00:00
teken
tools
ufs When renaming a directory from one parent directory to another, 2013-03-20 17:57:00 +00:00
vm Fix the logic inversion in the r248512. 2013-03-20 09:44:23 +00:00
x86
xdr Use m_get() and m_getcl() instead of compat macros. 2013-03-15 10:21:18 +00:00
xen
Makefile