freebsd-src/sys/ufs/ffs
Konstantin Belousov cc3d8c35f5 There are several code sequences like
vfs_busy(mp);
      vfs_write_suspend(mp);
which are problematic if other thread starts unmount between two
calls.  The unmount starts a write, while vfs_write_suspend() drain
writers.  On the other hand, unmount drains busy references, causing
the deadlock.

Add a flag argument to vfs_write_suspend and require the callers of it
to specify VS_SKIP_UNMOUNT flag, when the call is performed not in the
mount path, i.e. the covered vnode is not locked.  The suspension is
not attempted if VS_SKIP_UNMOUNT is specified and unmount is in
progress.

Reported and tested by:	Andreas Longwitz <longwitz@incore.de>
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2013-07-09 20:49:32 +00:00
..
ffs_alloc.c Make better use of metadata area by avoiding using it for data blocks 2013-07-02 21:07:08 +00:00
ffs_balloc.c Make better use of metadata area by avoiding using it for data blocks 2013-07-02 21:07:08 +00:00
ffs_extern.h Add UFS writesuspension mechanism, designed to allow userland processes 2012-11-18 18:57:19 +00:00
ffs_inode.c - Convert the bufobj lock to rwlock. 2013-05-31 00:43:41 +00:00
ffs_rawread.c Do not remap usermode pages into KVA for physio. 2013-03-19 14:43:57 +00:00
ffs_snapshot.c There are several code sequences like 2013-07-09 20:49:32 +00:00
ffs_softdep.c - Convert the bufobj lock to rwlock. 2013-05-31 00:43:41 +00:00
ffs_subr.c - Merge soft-updates journaling from projects/suj/head into head. This 2010-04-24 07:05:35 +00:00
ffs_suspend.c There are several code sequences like 2013-07-09 20:49:32 +00:00
ffs_tables.c
ffs_vfsops.c There are several code sequences like 2013-07-09 20:49:32 +00:00
ffs_vnops.c UFS support of the unmapped i/o for the user data buffers. 2013-03-19 15:08:15 +00:00
fs.h The purpose of this change to the FFS layout policy is to reduce the 2013-03-22 21:45:28 +00:00
softdep.h - Speed up pendingblock processing again. Having too much delay between 2011-07-04 22:08:04 +00:00