Syncronize filesystems to disk when suspending. Each mountpoint's vnodes
authorderaadt <deraadt@openbsd.org>
Sat, 10 Feb 2018 05:24:23 +0000 (05:24 +0000)
committerderaadt <deraadt@openbsd.org>
Sat, 10 Feb 2018 05:24:23 +0000 (05:24 +0000)
commit976e983900b26f1c1815971efe0ad0990654d735
treec90c173ad1fe96f8d75d1052c7bae0166ca8c7e7
parent50b6cc81a0aafbbb2e5a47d85069457e74b73dd7
Syncronize filesystems to disk when suspending.  Each mountpoint's vnodes
are pushed to disk.  Dangling vnodes (unlinked files still in use) and
vnodes undergoing change by long-running syscalls are identified -- and
such filesystems are marked dirty on-disk while we are suspended (in case
power is lost, a fsck will be required).  Filesystems without dangling or
busy vnodes are marked clean, resulting in faster boots following
"battery died" circumstances.
Tested by numerous developers, thanks for the feedback.
22 files changed:
sys/dev/acpi/acpi.c
sys/isofs/cd9660/cd9660_extern.h
sys/isofs/cd9660/cd9660_vfsops.c
sys/isofs/udf/udf_extern.h
sys/isofs/udf/udf_vfsops.c
sys/kern/vfs_subr.c
sys/kern/vfs_sync.c
sys/kern/vfs_syscalls.c
sys/kern/vfs_vops.c
sys/miscfs/fuse/fuse_vfsops.c
sys/msdosfs/msdosfs_vfsops.c
sys/msdosfs/msdosfsmount.h
sys/nfs/nfs_vfsops.c
sys/ntfs/ntfs_vfsops.c
sys/sys/file.h
sys/sys/mount.h
sys/sys/vnode.h
sys/ufs/ext2fs/ext2fs_extern.h
sys/ufs/ext2fs/ext2fs_vfsops.c
sys/ufs/ffs/ffs_extern.h
sys/ufs/ffs/ffs_softdep.c
sys/ufs/ffs/ffs_vfsops.c