From 46a5fdccdbec824aec3e3e383277baed4c200dee Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sat, 10 Feb 2018 05:24:24 +0000 Subject: 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. --- sys/ntfs/ntfs_vfsops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/ntfs') diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c index 6ceac5b3288..9ad5ac1e01d 100644 --- a/sys/ntfs/ntfs_vfsops.c +++ b/sys/ntfs/ntfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_vfsops.c,v 1.57 2017/12/11 05:27:40 deraadt Exp $ */ +/* $OpenBSD: ntfs_vfsops.c,v 1.58 2018/02/10 05:24:23 deraadt Exp $ */ /* $NetBSD: ntfs_vfsops.c,v 1.7 2003/04/24 07:50:19 christos Exp $ */ /*- @@ -60,7 +60,7 @@ int ntfs_root(struct mount *, struct vnode **); int ntfs_start(struct mount *, int, struct proc *); int ntfs_statfs(struct mount *, struct statfs *, struct proc *); -int ntfs_sync(struct mount *, int, struct ucred *, +int ntfs_sync(struct mount *, int, int, struct ucred *, struct proc *); int ntfs_unmount(struct mount *, int, struct proc *); int ntfs_vget(struct mount *mp, ino_t ino, @@ -612,7 +612,7 @@ ntfs_statfs(struct mount *mp, struct statfs *sbp, struct proc *p) } int -ntfs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct proc *p) +ntfs_sync(struct mount *mp, int waitfor, int stall, struct ucred *cred, struct proc *p) { /*DPRINTF("ntfs_sync():\n");*/ return (0); -- cgit v1.2.3