diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2017-12-14 20:20:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2017-12-14 20:20:39 +0000 |
commit | 0d0ca081a91d670c354dd808865d61af95d43c04 (patch) | |
tree | 922d1b6127ef2fd18b4d4e3a5730fe5a7a6e458a /sys/kern | |
parent | 0bf7b44438def5f9a9675b4cc4ab0719c856973b (diff) |
Give vflush_vnode() a hint about vnodes we don't need to account as "busy".
Change mountpoint to RDONLY a little later. Seems to improve the
rw->ro transition a bit.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_subr.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 088a8f883b7..da17524a115 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.263 2017/12/11 14:11:22 bluhm Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.264 2017/12/14 20:20:38 deraadt Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -904,11 +904,15 @@ vflush_vnode(struct vnode *vp, void *arg) return (0); } - if (va->flags & WRITEDEMOTE) { - vp->v_op = &dead_vops; - vp->v_tag = VT_NON; + /* + * If set, this is allowed to ignore vnodes which don't + * have changes pending to disk. + * XXX Might be nice to check per-fs "inode" flags, but + * generally the filesystem is sync'd already, right? + */ + if ((va->flags & IGNORECLEAN) && + LIST_EMPTY(&vp->v_dirtyblkhd)) return (0); - } #ifdef DEBUG if (busyprt) |