Konstantin Belousov 91e9474552 Make it possible to atomically resume writes on the mount and account
the write start, by adding a variation of the vfs_write_resume(9)
which accepts flags.

Use the new function to prevent a deadlock between parallel suspension
and snapshotting a UFS mount.  The ffs_snapshot() code performed
vfs_write_resume() followed by vn_start_write() while owning the
snaplock.  If the suspension intervene between resume and
vn_start_write(), the deadlock occured after the suspending thread
tried to lock the snaplock, most typically during the write in the
ffs_copyonwrite().

Reported and tested by:	Andreas Longwitz <longwitz@incore.de>
Reviewed by:	mckusick
MFC after:	2 weeks
X-MFC-note:	make the vfs_write_resume(9) function a macro after the MFC,
	in HEAD
2012-12-28 23:08:30 +00:00
..
2012-11-11 23:25:47 +00:00
2012-11-11 23:25:47 +00:00
2012-12-28 17:41:36 +00:00
2012-01-15 13:23:18 +00:00
2012-01-15 13:23:18 +00:00
2012-01-15 13:23:18 +00:00
2012-09-04 12:07:33 +00:00
2012-01-15 13:23:18 +00:00
2012-12-10 23:12:51 +00:00
2012-11-13 18:24:47 +00:00
2012-03-28 20:58:30 +00:00
2012-02-27 18:28:31 +00:00
2012-11-13 12:53:41 +00:00
2012-11-13 12:53:41 +00:00
2012-11-13 12:53:41 +00:00
2012-11-03 22:21:37 +00:00
2012-08-21 17:06:36 +00:00