]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When attempt is made to suspend a filesystem that is already syspended,
authorkib <kib@FreeBSD.org>
Tue, 16 Sep 2008 11:51:06 +0000 (11:51 +0000)
committerkib <kib@FreeBSD.org>
Tue, 16 Sep 2008 11:51:06 +0000 (11:51 +0000)
commitf6863a9ef79ec34cd371070704d592a2b5c019c1
tree916cd048737fbe3376fc7973f694d424abd09e34
parent0488506405edd848b205c59066a7f0b5d53e55e7
When attempt is made to suspend a filesystem that is already syspended,
wait until the current suspension is lifted instead of silently returning
success immediately. The consequences of calling vfs_write() resume when
not owning the suspension are not well-defined at best.

Add the vfs_susp_clean() mount method to be called from
vfs_write_resume(). Set it to process_deferred_inactive() for ffs, and
stop calling it manually.

Add the thread flag TDP_IGNSUSP that allows to bypass the suspension
point in the vn_start_write. It is intended for use by VFS in the
situations where the suspender want to do some i/o requiring calls to
vn_start_write(), and this i/o cannot be done later.

Reviewed by: tegge
In collaboration with: pho
MFC after:  1 month
sys/kern/vfs_vnops.c
sys/sys/mount.h
sys/sys/proc.h
sys/ufs/ffs/ffs_extern.h
sys/ufs/ffs/ffs_snapshot.c
sys/ufs/ffs/ffs_vfsops.c