From 1b60626aca1eb9231d53975be1cfc6005fd4a831 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 16 Dec 2014 18:30:05 +0000 Subject: primary change: move uvm_vnode out of vnode, keeping only a pointer. objective: vnode.h doesn't include uvm_extern.h anymore. followup changes: include uvm_extern.h or lock.h where necessary. ok and help from deraadt --- sys/arch/amd64/amd64/autoconf.c | 3 ++- sys/arch/hppa/hppa/vm_machdep.c | 6 +++--- sys/arch/i386/i386/linux_machdep.c | 5 +++-- sys/arch/mips64/mips64/vm_machdep.c | 3 ++- sys/compat/common/compat_util.c | 4 +++- sys/dev/diskmap.c | 3 ++- sys/dev/pci/bktr/bktr_core.c | 4 +++- sys/dev/softraid.c | 4 +++- sys/dev/video.c | 4 +++- sys/isofs/cd9660/cd9660_bmap.c | 3 ++- sys/isofs/cd9660/cd9660_lookup.c | 3 ++- sys/isofs/cd9660/cd9660_node.c | 3 ++- sys/isofs/cd9660/cd9660_rrip.c | 4 ++-- sys/isofs/cd9660/cd9660_vfsops.c | 3 ++- sys/isofs/cd9660/cd9660_vnops.c | 3 ++- sys/isofs/udf/udf_subr.c | 3 ++- sys/isofs/udf/udf_vfsops.c | 3 ++- sys/isofs/udf/udf_vnops.c | 3 ++- sys/kern/exec_elf.c | 4 +++- sys/kern/exec_script.c | 3 ++- sys/kern/exec_subr.c | 4 +++- sys/kern/init_main.c | 4 +++- sys/kern/kern_descrip.c | 3 ++- sys/kern/kern_exec.c | 4 +++- sys/kern/kern_exit.c | 4 +++- sys/kern/kern_ktrace.c | 3 ++- sys/kern/kern_sig.c | 4 +++- sys/kern/spec_vnops.c | 3 ++- sys/kern/subr_disk.c | 10 +++++----- sys/kern/tty.c | 4 +++- sys/kern/tty_tty.c | 3 ++- sys/kern/vfs_bio.c | 4 +++- sys/kern/vfs_cache.c | 3 ++- sys/kern/vfs_getcwd.c | 3 ++- sys/kern/vfs_lookup.c | 3 ++- sys/kern/vfs_subr.c | 10 +++++++++- sys/kern/vfs_sync.c | 3 ++- sys/kern/vfs_syscalls.c | 3 ++- sys/kern/vfs_vnops.c | 3 ++- sys/miscfs/deadfs/dead_vnops.c | 3 ++- sys/miscfs/fifofs/fifo_vnops.c | 3 ++- sys/miscfs/fuse/fuse_lookup.c | 3 ++- sys/miscfs/fuse/fuse_vfsops.c | 3 ++- sys/miscfs/fuse/fuse_vnops.c | 3 ++- sys/msdosfs/msdosfs_conv.c | 3 ++- sys/msdosfs/msdosfs_denode.c | 3 ++- sys/msdosfs/msdosfs_fat.c | 3 ++- sys/msdosfs/msdosfs_lookup.c | 3 ++- sys/msdosfs/msdosfs_vfsops.c | 3 ++- sys/msdosfs/msdosfs_vnops.c | 3 ++- sys/net/bpf.c | 3 ++- sys/nfs/nfs_node.c | 3 ++- sys/nfs/nfs_serv.c | 3 ++- sys/nfs/nfs_vfsops.c | 3 ++- sys/nfs/nfs_vnops.c | 3 ++- sys/scsi/st.c | 16 ++++++++-------- sys/sys/vnode.h | 15 ++++++++++----- sys/tmpfs/tmpfs.h | 4 +++- sys/uvm/uvm_extern.h | 6 +----- sys/uvm/uvm_mmap.c | 4 ++-- sys/uvm/uvm_vnode.c | 20 ++++++++++---------- sys/uvm/uvm_vnode.h | 9 +++++---- 62 files changed, 173 insertions(+), 98 deletions(-) (limited to 'sys') diff --git a/sys/arch/amd64/amd64/autoconf.c b/sys/arch/amd64/amd64/autoconf.c index e758fbf8aed..7e699d193cc 100644 --- a/sys/arch/amd64/amd64/autoconf.c +++ b/sys/arch/amd64/amd64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.40 2013/11/19 09:00:43 mpi Exp $ */ +/* $OpenBSD: autoconf.c,v 1.41 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: autoconf.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /*- @@ -67,6 +67,7 @@ #include #include +#include #include #include diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c index b7a7c6fd93c..fca81111753 100644 --- a/sys/arch/hppa/hppa/vm_machdep.c +++ b/sys/arch/hppa/hppa/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.79 2014/11/16 12:30:57 deraadt Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.80 2014/12/16 18:30:03 tedu Exp $ */ /* * Copyright (c) 1999-2004 Michael Shalayeff @@ -40,13 +40,13 @@ #include #include +#include + #include #include #include #include -#include - extern struct pool hppa_fppl; /* diff --git a/sys/arch/i386/i386/linux_machdep.c b/sys/arch/i386/i386/linux_machdep.c index 81d4081d6f0..3ada48c99fe 100644 --- a/sys/arch/i386/i386/linux_machdep.c +++ b/sys/arch/i386/i386/linux_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_machdep.c,v 1.45 2014/03/26 05:23:42 guenther Exp $ */ +/* $OpenBSD: linux_machdep.c,v 1.46 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: linux_machdep.c,v 1.29 1996/05/03 19:42:11 christos Exp $ */ /* @@ -46,12 +46,13 @@ #include #include #include -#include #include #include #include #include +#include + #include #include #include diff --git a/sys/arch/mips64/mips64/vm_machdep.c b/sys/arch/mips64/mips64/vm_machdep.c index da6741cc0f7..900785dc59f 100644 --- a/sys/arch/mips64/mips64/vm_machdep.c +++ b/sys/arch/mips64/mips64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.30 2014/11/16 12:30:58 deraadt Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.31 2014/12/16 18:30:03 tedu Exp $ */ /* * Copyright (c) 1988 University of Utah. * Copyright (c) 1992, 1993 @@ -52,6 +52,7 @@ #include #include +#include #include #include diff --git a/sys/compat/common/compat_util.c b/sys/compat/common/compat_util.c index f1cc4414fe6..039fbe93426 100644 --- a/sys/compat/common/compat_util.c +++ b/sys/compat/common/compat_util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat_util.c,v 1.13 2014/07/12 18:50:00 tedu Exp $ */ +/* $OpenBSD: compat_util.c,v 1.14 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: compat_util.c,v 1.4 1996/03/14 19:31:45 christos Exp $ */ /* @@ -42,6 +42,8 @@ #include #include +#include + #include /* diff --git a/sys/dev/diskmap.c b/sys/dev/diskmap.c index 124f28d0e5d..99487560666 100644 --- a/sys/dev/diskmap.c +++ b/sys/dev/diskmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diskmap.c,v 1.8 2014/07/12 18:48:17 tedu Exp $ */ +/* $OpenBSD: diskmap.c,v 1.9 2014/12/16 18:30:03 tedu Exp $ */ /* * Copyright (c) 2009, 2010 Joel Sing @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/dev/pci/bktr/bktr_core.c b/sys/dev/pci/bktr/bktr_core.c index c518c28b94d..852da283855 100644 --- a/sys/dev/pci/bktr/bktr_core.c +++ b/sys/dev/pci/bktr/bktr_core.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bktr_core.c,v 1.33 2014/05/04 20:09:15 sf Exp $ */ +/* $OpenBSD: bktr_core.c,v 1.34 2014/12/16 18:30:03 tedu Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp $ */ /* @@ -102,6 +102,8 @@ #include #include /* uintptr_t */ +#include + #include #include #include diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 7065bd9fa83..dc2a910db30 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.344 2014/11/18 02:37:30 tedu Exp $ */ +/* $OpenBSD: softraid.c,v 1.345 2014/12/16 18:30:03 tedu Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom * Copyright (c) 2008 Chris Kuethe @@ -42,6 +42,8 @@ #include #include +#include + #include #include diff --git a/sys/dev/video.c b/sys/dev/video.c index 11dc2b0e6bf..0668398b25f 100644 --- a/sys/dev/video.c +++ b/sys/dev/video.c @@ -1,4 +1,4 @@ -/* $OpenBSD: video.c,v 1.33 2014/10/18 08:01:34 armani Exp $ */ +/* $OpenBSD: video.c,v 1.34 2014/12/16 18:30:03 tedu Exp $ */ /* * Copyright (c) 2008 Robert Nagy @@ -33,6 +33,8 @@ #include #include +#include + #ifdef VIDEO_DEBUG #define DPRINTF(x) do { printf x; } while (0) #else diff --git a/sys/isofs/cd9660/cd9660_bmap.c b/sys/isofs/cd9660/cd9660_bmap.c index be253c5e99f..7ec89f4e8d6 100644 --- a/sys/isofs/cd9660/cd9660_bmap.c +++ b/sys/isofs/cd9660/cd9660_bmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_bmap.c,v 1.7 2013/06/11 16:42:15 deraadt Exp $ */ +/* $OpenBSD: cd9660_bmap.c,v 1.8 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: cd9660_bmap.c,v 1.7 1997/01/24 00:27:29 cgd Exp $ */ /*- @@ -42,6 +42,7 @@ #include #include #include +#include #include #include diff --git a/sys/isofs/cd9660/cd9660_lookup.c b/sys/isofs/cd9660/cd9660_lookup.c index 94ff10933d8..82d39c57fdb 100644 --- a/sys/isofs/cd9660/cd9660_lookup.c +++ b/sys/isofs/cd9660/cd9660_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_lookup.c,v 1.21 2014/07/12 18:50:00 tedu Exp $ */ +/* $OpenBSD: cd9660_lookup.c,v 1.22 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: cd9660_lookup.c,v 1.18 1997/05/08 16:19:59 mycroft Exp $ */ /*- @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index e77f710cd91..d9a7e93e4e6 100644 --- a/sys/isofs/cd9660/cd9660_node.c +++ b/sys/isofs/cd9660/cd9660_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_node.c,v 1.26 2014/11/18 10:42:15 dlg Exp $ */ +/* $OpenBSD: cd9660_node.c,v 1.27 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: cd9660_node.c,v 1.17 1997/05/05 07:13:57 mycroft Exp $ */ /*- @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/isofs/cd9660/cd9660_rrip.c b/sys/isofs/cd9660/cd9660_rrip.c index 75240e24d34..cdcc1fb5809 100644 --- a/sys/isofs/cd9660/cd9660_rrip.c +++ b/sys/isofs/cd9660/cd9660_rrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_rrip.c,v 1.11 2013/05/30 17:35:01 guenther Exp $ */ +/* $OpenBSD: cd9660_rrip.c,v 1.12 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: cd9660_rrip.c,v 1.17 1997/01/24 00:27:32 cgd Exp $ */ /*- @@ -43,11 +43,11 @@ #include #include #include +#include #include #include #include #include - #include #include diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index a9bdc9a27ea..06d49848a17 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vfsops.c,v 1.68 2014/07/12 18:50:00 tedu Exp $ */ +/* $OpenBSD: cd9660_vfsops.c,v 1.69 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */ /*- @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 0770eb85537..a13c2776920 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vnops.c,v 1.68 2014/11/03 21:28:35 tedu Exp $ */ +/* $OpenBSD: cd9660_vnops.c,v 1.69 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */ /*- @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/isofs/udf/udf_subr.c b/sys/isofs/udf/udf_subr.c index 9771fe38063..74971612fba 100644 --- a/sys/isofs/udf/udf_subr.c +++ b/sys/isofs/udf/udf_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_subr.c,v 1.24 2014/11/18 10:42:15 dlg Exp $ */ +/* $OpenBSD: udf_subr.c,v 1.25 2014/12/16 18:30:03 tedu Exp $ */ /* * Copyright (c) 2006, Miodrag Vallat @@ -35,6 +35,7 @@ #include #include #include +#include #include #include diff --git a/sys/isofs/udf/udf_vfsops.c b/sys/isofs/udf/udf_vfsops.c index 58cda539e2f..91c94685fe5 100644 --- a/sys/isofs/udf/udf_vfsops.c +++ b/sys/isofs/udf/udf_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_vfsops.c,v 1.43 2014/11/18 10:42:15 dlg Exp $ */ +/* $OpenBSD: udf_vfsops.c,v 1.44 2014/12/16 18:30:03 tedu Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long @@ -64,6 +64,7 @@ #include #include #include +#include #include #include diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c index 4c318ce27fa..260f925c35e 100644 --- a/sys/isofs/udf/udf_vnops.c +++ b/sys/isofs/udf/udf_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_vnops.c,v 1.57 2014/11/18 10:42:15 dlg Exp $ */ +/* $OpenBSD: udf_vnops.c,v 1.58 2014/12/16 18:30:03 tedu Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index e37402cf386..4630e52d561 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.106 2014/11/16 12:31:00 deraadt Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.107 2014/12/16 18:30:03 tedu Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -86,6 +86,8 @@ #include +#include + #include #include diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c index f2f788fc4c7..d7af095f23b 100644 --- a/sys/kern/exec_script.c +++ b/sys/kern/exec_script.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_script.c,v 1.33 2014/11/19 21:19:15 tedu Exp $ */ +/* $OpenBSD: exec_script.c,v 1.34 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: exec_script.c,v 1.13 1996/02/04 02:15:06 christos Exp $ */ /* @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/kern/exec_subr.c b/sys/kern/exec_subr.c index c392a00097a..404a127892b 100644 --- a/sys/kern/exec_subr.c +++ b/sys/kern/exec_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_subr.c,v 1.44 2014/12/15 02:24:23 guenther Exp $ */ +/* $OpenBSD: exec_subr.c,v 1.45 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: exec_subr.c,v 1.9 1994/12/04 03:10:42 mycroft Exp $ */ /* @@ -41,6 +41,8 @@ #include #include +#include + #ifdef DEBUG /* * new_vmcmd(): diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index a4c8e69345b..b197c0a4c51 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.227 2014/12/15 02:24:23 guenther Exp $ */ +/* $OpenBSD: init_main.c,v 1.228 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -80,6 +80,8 @@ #include #include +#include + #include #include diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 0462dde3516..b3acaff6acd 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_descrip.c,v 1.113 2014/08/31 01:42:36 guenther Exp $ */ +/* $OpenBSD: kern_descrip.c,v 1.114 2014/12/16 18:30:03 tedu Exp $ */ /* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */ /* @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 461bdec341a..496e539b428 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.151 2014/12/15 02:24:23 guenther Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.152 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -59,6 +59,8 @@ #include +#include + #include #ifdef __HAVE_MD_TCB diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index e4955619a1e..829a7291448 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.147 2014/07/12 18:43:32 tedu Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.148 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -71,6 +71,8 @@ #include #include +#include + /* * exit -- * Death of process. diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 32cbd272b9a..d1ee31273e7 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ktrace.c,v 1.71 2014/12/10 02:44:47 tedu Exp $ */ +/* $OpenBSD: kern_ktrace.c,v 1.72 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */ /* @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 9d536ea95fa..bd6d1dcdba4 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.175 2014/11/16 05:42:21 guenther Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.176 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -66,6 +66,8 @@ #include #include +#include + int filt_sigattach(struct knote *kn); void filt_sigdetach(struct knote *kn); int filt_signal(struct knote *kn, long hint); diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c index 8dc8c1205db..2b7702adbdc 100644 --- a/sys/kern/spec_vnops.c +++ b/sys/kern/spec_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spec_vnops.c,v 1.80 2014/11/03 21:28:35 tedu Exp $ */ +/* $OpenBSD: spec_vnops.c,v 1.81 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */ /* @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index 75e4517e467..301bbd0fc61 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.173 2014/11/03 21:00:27 tedu Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.174 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -1471,9 +1471,9 @@ setroot(struct device *bootdv, int part, int exitflags) } printf(": "); s = splhigh(); - cnpollc(TRUE); + cnpollc(1); len = getsn(buf, sizeof(buf)); - cnpollc(FALSE); + cnpollc(0); splx(s); if (strcmp(buf, "exit") == 0) reboot(exitflags); @@ -1508,9 +1508,9 @@ setroot(struct device *bootdv, int part, int exitflags) rootdv->dv_class == DV_DISK ? "b" : ""); printf(": "); s = splhigh(); - cnpollc(TRUE); + cnpollc(1); len = getsn(buf, sizeof(buf)); - cnpollc(FALSE); + cnpollc(0); splx(s); if (strcmp(buf, "exit") == 0) reboot(exitflags); diff --git a/sys/kern/tty.c b/sys/kern/tty.c index ff0bd0ff113..1dfa07edcd3 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.117 2014/12/10 02:44:47 tedu Exp $ */ +/* $OpenBSD: tty.c,v 1.118 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -60,6 +60,8 @@ #include +#include + #include #include "pty.h" diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index 75e3db2b807..ec3b20d5f78 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_tty.c,v 1.12 2011/10/06 09:14:35 mikeb Exp $ */ +/* $OpenBSD: tty_tty.c,v 1.13 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: tty_tty.c,v 1.13 1996/03/30 22:24:46 christos Exp $ */ /*- @@ -41,6 +41,7 @@ #include #include #include +#include #include #include diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 908d64ad339..fd2d47a7340 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.164 2014/12/11 14:33:48 jmc Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.165 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /* @@ -62,6 +62,8 @@ #include #endif /* HIBERNATE */ +#include + int nobuffers; int needbuffer; struct bio_ops bioops; diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index c1de88f9edf..cda6f7af431 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_cache.c,v 1.38 2014/12/10 02:44:47 tedu Exp $ */ +/* $OpenBSD: vfs_cache.c,v 1.39 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: vfs_cache.c,v 1.13 1996/02/04 02:18:09 christos Exp $ */ /* @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/kern/vfs_getcwd.c b/sys/kern/vfs_getcwd.c index c9a587d2409..739301923f2 100644 --- a/sys/kern/vfs_getcwd.c +++ b/sys/kern/vfs_getcwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_getcwd.c,v 1.23 2014/11/03 03:08:00 deraadt Exp $ */ +/* $OpenBSD: vfs_getcwd.c,v 1.24 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */ /* @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 2e0fcd59dac..76bb588b08c 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lookup.c,v 1.49 2014/12/10 02:44:47 tedu Exp $ */ +/* $OpenBSD: vfs_lookup.c,v 1.50 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */ /* @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 5b582d535d1..b2e3bc4b1d0 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.224 2014/12/10 02:44:47 tedu Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.225 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -65,6 +65,9 @@ #include +#include +#include + #include "softraid.h" void sr_shutdown(void); @@ -116,6 +119,7 @@ void printlockedvnodes(void); #endif struct pool vnode_pool; +struct pool uvm_vnode_pool; static int rb_buf_compare(struct buf *b1, struct buf *b2); RB_GENERATE(buf_rb_bufs, buf, b_rbbufs, rb_buf_compare); @@ -140,6 +144,8 @@ vntblinit(void) maxvnodes = 2 * desiredvnodes; pool_init(&vnode_pool, sizeof(struct vnode), 0, 0, 0, "vnodes", &pool_allocator_nointr); + pool_init(&uvm_vnode_pool, sizeof(struct uvm_vnode), 0, 0, 0, "uvmvnodes", + &pool_allocator_nointr); TAILQ_INIT(&vnode_hold_list); TAILQ_INIT(&vnode_free_list); TAILQ_INIT(&mountlist); @@ -350,6 +356,8 @@ getnewvnode(enum vtagtype tag, struct mount *mp, struct vops *vops, ((TAILQ_FIRST(listhd = &vnode_hold_list) == NULL) || toggle))) { splx(s); vp = pool_get(&vnode_pool, PR_WAITOK | PR_ZERO); + vp->v_uvm = pool_get(&uvm_vnode_pool, PR_WAITOK | PR_ZERO); + vp->v_uvm->u_vnode = vp; RB_INIT(&vp->v_bufs_tree); RB_INIT(&vp->v_nc_tree); TAILQ_INIT(&vp->v_cache_dst); diff --git a/sys/kern/vfs_sync.c b/sys/kern/vfs_sync.c index af1bfd1ae84..fc1044da6f3 100644 --- a/sys/kern/vfs_sync.c +++ b/sys/kern/vfs_sync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_sync.c,v 1.52 2014/09/09 07:07:39 blambert Exp $ */ +/* $OpenBSD: vfs_sync.c,v 1.53 2014/12/16 18:30:04 tedu Exp $ */ /* * Portions of this code are: @@ -46,6 +46,7 @@ #include #include #include +#include #include #include diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index d4317bff529..8cabaa149b0 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.215 2014/12/08 20:56:11 guenther Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.216 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 364e66b0446..1278779c09d 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vnops.c,v 1.79 2014/11/03 21:28:35 tedu Exp $ */ +/* $OpenBSD: vfs_vnops.c,v 1.80 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */ /* @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/miscfs/deadfs/dead_vnops.c b/sys/miscfs/deadfs/dead_vnops.c index d2dc3618ef0..b3610648ff7 100644 --- a/sys/miscfs/deadfs/dead_vnops.c +++ b/sys/miscfs/deadfs/dead_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dead_vnops.c,v 1.27 2014/09/14 14:17:26 jsg Exp $ */ +/* $OpenBSD: dead_vnops.c,v 1.28 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: dead_vnops.c,v 1.16 1996/02/13 13:12:48 mycroft Exp $ */ /* @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c index ffad287b5e2..b5c86cf0b30 100644 --- a/sys/miscfs/fifofs/fifo_vnops.c +++ b/sys/miscfs/fifofs/fifo_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fifo_vnops.c,v 1.43 2014/11/03 21:28:35 tedu Exp $ */ +/* $OpenBSD: fifo_vnops.c,v 1.44 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */ /* @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/miscfs/fuse/fuse_lookup.c b/sys/miscfs/fuse/fuse_lookup.c index 74b19d8d025..3267b51c0db 100644 --- a/sys/miscfs/fuse/fuse_lookup.c +++ b/sys/miscfs/fuse/fuse_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_lookup.c,v 1.9 2014/03/18 08:51:53 mpi Exp $ */ +/* $OpenBSD: fuse_lookup.c,v 1.10 2014/12/16 18:30:04 tedu Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon * @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "fusefs_node.h" diff --git a/sys/miscfs/fuse/fuse_vfsops.c b/sys/miscfs/fuse/fuse_vfsops.c index 04ca67c6074..6c8f5cc73df 100644 --- a/sys/miscfs/fuse/fuse_vfsops.c +++ b/sys/miscfs/fuse/fuse_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vfsops.c,v 1.12 2014/10/03 18:53:13 tedu Exp $ */ +/* $OpenBSD: fuse_vfsops.c,v 1.13 2014/12/16 18:30:04 tedu Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon * @@ -16,6 +16,7 @@ */ #include +#include #include #include #include diff --git a/sys/miscfs/fuse/fuse_vnops.c b/sys/miscfs/fuse/fuse_vnops.c index 81bf7a23ca6..b1b87c7f19f 100644 --- a/sys/miscfs/fuse/fuse_vnops.c +++ b/sys/miscfs/fuse/fuse_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vnops.c,v 1.20 2014/08/10 09:23:06 jsg Exp $ */ +/* $OpenBSD: fuse_vnops.c,v 1.21 2014/12/16 18:30:04 tedu Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon * @@ -29,6 +29,7 @@ #include #include #include +#include #include #include "fusefs_node.h" diff --git a/sys/msdosfs/msdosfs_conv.c b/sys/msdosfs/msdosfs_conv.c index e3105b80a01..0504d6fa031 100644 --- a/sys/msdosfs/msdosfs_conv.c +++ b/sys/msdosfs/msdosfs_conv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_conv.c,v 1.17 2014/04/21 15:35:02 krw Exp $ */ +/* $OpenBSD: msdosfs_conv.c,v 1.18 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: msdosfs_conv.c,v 1.24 1997/10/17 11:23:54 ws Exp $ */ /*- @@ -57,6 +57,7 @@ #include /* defines tz */ #include #include +#include /* * MSDOSFS include files. diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index aaf87b1dcb9..7c785a9bcd6 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_denode.c,v 1.51 2014/11/18 10:42:15 dlg Exp $ */ +/* $OpenBSD: msdosfs_denode.c,v 1.52 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 ws Exp $ */ /*- @@ -54,6 +54,7 @@ #include #include #include +#include #include /* defines "time" */ #include #include diff --git a/sys/msdosfs/msdosfs_fat.c b/sys/msdosfs/msdosfs_fat.c index 2a7877ca327..c1eee86631e 100644 --- a/sys/msdosfs/msdosfs_fat.c +++ b/sys/msdosfs/msdosfs_fat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_fat.c,v 1.25 2014/06/18 17:24:46 tobias Exp $ */ +/* $OpenBSD: msdosfs_fat.c,v 1.26 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: msdosfs_fat.c,v 1.26 1997/10/17 11:24:02 ws Exp $ */ /*- @@ -58,6 +58,7 @@ #include #include /* to define statfs structure */ #include /* to define vattr structure */ +#include #include #include diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c index 0355f383547..1dcc4f80ae4 100644 --- a/sys/msdosfs/msdosfs_lookup.c +++ b/sys/msdosfs/msdosfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_lookup.c,v 1.26 2013/06/11 16:42:16 deraadt Exp $ */ +/* $OpenBSD: msdosfs_lookup.c,v 1.27 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: msdosfs_lookup.c,v 1.34 1997/10/18 22:12:27 ws Exp $ */ /*- @@ -53,6 +53,7 @@ #include #include #include +#include #include #include diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c index ae58709c208..6852542fb85 100644 --- a/sys/msdosfs/msdosfs_vfsops.c +++ b/sys/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vfsops.c,v 1.69 2014/12/09 07:05:06 doug Exp $ */ +/* $OpenBSD: msdosfs_vfsops.c,v 1.70 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */ /*- @@ -54,6 +54,7 @@ #include #include #include +#include #include /* XXX */ /* defines v_rdev */ #include #include diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index ab6b76b95f7..3df7e5fdc68 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vnops.c,v 1.96 2014/11/03 21:28:35 tedu Exp $ */ +/* $OpenBSD: msdosfs_vnops.c,v 1.97 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */ /*- @@ -60,6 +60,7 @@ #include #include #include +#include #include #include /* XXX */ /* defines v_rdev */ #include diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 8850358811d..bbd9a59a265 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.112 2014/12/02 18:11:56 tedu Exp $ */ +/* $OpenBSD: bpf.c,v 1.113 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -41,6 +41,7 @@ #include "bpfilter.h" #include +#include #include #include #include diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index b5610761f51..b3c234aee0a 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_node.c,v 1.58 2014/11/15 00:03:12 tedu Exp $ */ +/* $OpenBSD: nfs_node.c,v 1.59 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */ /* @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index 5b48ba14829..71c33f98795 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_serv.c,v 1.100 2014/11/18 02:22:33 tedu Exp $ */ +/* $OpenBSD: nfs_serv.c,v 1.101 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */ /* @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index 2949fcbf25e..20923b76126 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vfsops.c,v 1.103 2014/11/15 00:03:12 tedu Exp $ */ +/* $OpenBSD: nfs_vfsops.c,v 1.104 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */ /* @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 7593a311d7c..ce5349dcbae 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.157 2014/12/03 04:16:58 tedu Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.158 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 9035c040958..493f88ecb86 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.127 2014/09/14 14:17:26 jsg Exp $ */ +/* $OpenBSD: st.c,v 1.128 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -654,7 +654,7 @@ st_mount_tape(dev_t dev, int flags) if (st->blksize) st->flags |= ST_FIXEDBLOCKS; } else { - if ((error = st_decide_mode(st, FALSE)) != 0) + if ((error = st_decide_mode(st, 0)) != 0) goto done; } if ((error = st_mode_select(st, 0)) != 0) { @@ -692,7 +692,7 @@ st_unmount(struct st_softc *st, int eject, int rewind) if (!(st->flags & ST_MOUNTED)) return; SC_DEBUG(sc_link, SDEV_DB1, ("unmounting\n")); - st_check_eod(st, FALSE, &nmarks, SCSI_IGNORE_NOT_READY); + st_check_eod(st, 0, &nmarks, SCSI_IGNORE_NOT_READY); if (rewind) st_rewind(st, 0, SCSI_IGNORE_NOT_READY); scsi_prevent(sc_link, PR_ALLOW, @@ -1215,7 +1215,7 @@ stioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *p) case MTBSF: /* backward space file */ number = -number; case MTFSF: /* forward space file */ - error = st_check_eod(st, FALSE, &nmarks, flags); + error = st_check_eod(st, 0, &nmarks, flags); if (!error) error = st_space(st, number - nmarks, SP_FILEMARKS, flags); @@ -1223,7 +1223,7 @@ stioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *p) case MTBSR: /* backward space record */ number = -number; case MTFSR: /* forward space record */ - error = st_check_eod(st, TRUE, &nmarks, flags); + error = st_check_eod(st, 1, &nmarks, flags); if (!error) error = st_space(st, number, SP_BLKS, flags); break; @@ -1241,7 +1241,7 @@ stioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *p) error = st_load(st, LD_LOAD, flags); break; case MTEOM: /* forward space to end of media */ - error = st_check_eod(st, FALSE, &nmarks, flags); + error = st_check_eod(st, 0, &nmarks, flags); if (!error) error = st_space(st, 1, SP_EOM, flags); break; @@ -1876,7 +1876,7 @@ st_load(struct st_softc *st, u_int type, int flags) st->media_eom = -1; if (type != LD_LOAD) { - error = st_check_eod(st, FALSE, &nmarks, flags); + error = st_check_eod(st, 0, &nmarks, flags); if (error) return (error); } @@ -1918,7 +1918,7 @@ st_rewind(struct st_softc *st, u_int immediate, int flags) struct scsi_xfer *xs; int error, nmarks; - error = st_check_eod(st, FALSE, &nmarks, flags); + error = st_check_eod(st, 0, &nmarks, flags); if (error) return (error); st->flags &= ~ST_PER_ACTION; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index df5b211e943..21988c9ac67 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vnode.h,v 1.127 2014/11/19 18:04:54 tedu Exp $ */ +/* $OpenBSD: vnode.h,v 1.128 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */ /* @@ -41,9 +41,6 @@ #include #include -#include -#include - /* * The vnode is the focus of all file activity in UNIX. There is a * unique vnode allocated for each active file, each current directory, @@ -86,8 +83,9 @@ LIST_HEAD(buflists, buf); RB_HEAD(buf_rb_bufs, buf); RB_HEAD(namecache_rb_cache, namecache); +struct uvm_vnode; struct vnode { - struct uvm_vnode v_uvm; /* uvm data */ + struct uvm_vnode *v_uvm; /* uvm data */ struct vops *v_op; /* vnode operations vector */ enum vtype v_type; /* vnode type */ enum vtagtype v_tag; /* type of underlying data */ @@ -654,5 +652,12 @@ int vn_isdisk(struct vnode *, int *); int softdep_fsync(struct vnode *); int getvnode(struct filedesc *, int, struct file **); +/* uvm */ +void uvm_vnp_setsize(struct vnode *, off_t); +void uvm_vnp_sync(struct mount *); +void uvm_vnp_terminate(struct vnode *); +int uvm_vnp_uncache(struct vnode *); + + #endif /* _KERNEL */ #endif /* _SYS_VNODE_H_ */ diff --git a/sys/tmpfs/tmpfs.h b/sys/tmpfs/tmpfs.h index 54916a238a1..8a606a5bc04 100644 --- a/sys/tmpfs/tmpfs.h +++ b/sys/tmpfs/tmpfs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmpfs.h,v 1.5 2013/12/14 18:01:52 espie Exp $ */ +/* $OpenBSD: tmpfs.h,v 1.6 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: tmpfs.h,v 1.45 2011/09/27 01:10:43 christos Exp $ */ /* @@ -45,6 +45,8 @@ #include #include +#include + /* * Internal representation of a tmpfs directory entry. * diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index 75fe80365b8..62d3ea9ff36 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_extern.h,v 1.126 2014/12/15 02:24:23 guenther Exp $ */ +/* $OpenBSD: uvm_extern.h,v 1.127 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */ /* @@ -472,10 +472,6 @@ int uvm_coredump_walkmap(struct proc *, struct uvm_coredump_state *), void *); void uvm_grow(struct proc *, vaddr_t); void uvm_deallocate(vm_map_t, vaddr_t, vsize_t); -void uvm_vnp_setsize(struct vnode *, voff_t); -void uvm_vnp_sync(struct mount *); -void uvm_vnp_terminate(struct vnode *); -boolean_t uvm_vnp_uncache(struct vnode *); struct uvm_object *uvn_attach(struct vnode *, vm_prot_t); void uvm_pagezero_thread(void *); void kmeminit_nkmempages(void); diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index 860cb79bba0..3912d34dd39 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.102 2014/12/15 02:24:23 guenther Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.103 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -136,7 +136,7 @@ sys_mquery(struct proc *p, void *v, register_t *retval) if (fd >= 0) { if ((error = getvnode(p->p_fd, fd, &fp)) != 0) return (error); - uobj = &((struct vnode *)fp->f_data)->v_uvm.u_obj; + uobj = &((struct vnode *)fp->f_data)->v_uvm->u_obj; uoff = SCARG(uap, pos); } else { fp = NULL; diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c index 43fda694ace..c53b7f38a14 100644 --- a/sys/uvm/uvm_vnode.c +++ b/sys/uvm/uvm_vnode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_vnode.c,v 1.85 2014/11/16 12:31:01 deraadt Exp $ */ +/* $OpenBSD: uvm_vnode.c,v 1.86 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */ /* @@ -136,7 +136,7 @@ uvn_init(void) struct uvm_object * uvn_attach(struct vnode *vp, vm_prot_t accessprot) { - struct uvm_vnode *uvn = &vp->v_uvm; + struct uvm_vnode *uvn = vp->v_uvm; struct vattr vattr; int oldflags, result; struct partinfo pi; @@ -306,7 +306,7 @@ uvn_detach(struct uvm_object *uobj) /* get other pointers ... */ uvn = (struct uvm_vnode *) uobj; - vp = (struct vnode *) uobj; + vp = uvn->u_vnode; /* * clear VTEXT flag now that there are no mappings left (VTEXT is used @@ -406,7 +406,7 @@ uvn_detach(struct uvm_object *uobj) void uvm_vnp_terminate(struct vnode *vp) { - struct uvm_vnode *uvn = &vp->v_uvm; + struct uvm_vnode *uvn = vp->v_uvm; int oldflags; /* check if it is valid */ @@ -1110,7 +1110,7 @@ uvn_io(struct uvm_vnode *uvn, vm_page_t *pps, int npages, int flags, int rw) /* init values */ waitf = (flags & PGO_SYNCIO) ? M_WAITOK : M_NOWAIT; - vn = (struct vnode *) uvn; + vn = uvn->u_vnode; file_offset = pps[0]->offset; /* check for sync'ing I/O. */ @@ -1260,10 +1260,10 @@ uvn_io(struct uvm_vnode *uvn, vm_page_t *pps, int npages, int flags, int rw) * vn_writechk: if VTEXT vnode and can't uncache return "text busy" */ -boolean_t +int uvm_vnp_uncache(struct vnode *vp) { - struct uvm_vnode *uvn = &vp->v_uvm; + struct uvm_vnode *uvn = vp->v_uvm; /* lock uvn part of the vnode and check if we need to do anything */ @@ -1333,9 +1333,9 @@ uvm_vnp_uncache(struct vnode *vp) */ void -uvm_vnp_setsize(struct vnode *vp, voff_t newsize) +uvm_vnp_setsize(struct vnode *vp, off_t newsize) { - struct uvm_vnode *uvn = &vp->v_uvm; + struct uvm_vnode *uvn = vp->v_uvm; /* lock uvn and check for valid object, and if valid: do it! */ if (uvn->u_flags & UVM_VNODE_VALID) { @@ -1381,7 +1381,7 @@ uvm_vnp_sync(struct mount *mp) */ SIMPLEQ_INIT(&uvn_sync_q); LIST_FOREACH(uvn, &uvn_wlist, u_wlist) { - vp = (struct vnode *)uvn; + vp = uvn->u_vnode; if (mp && vp->v_mount != mp) continue; diff --git a/sys/uvm/uvm_vnode.h b/sys/uvm/uvm_vnode.h index abb25149bc4..de098e52800 100644 --- a/sys/uvm/uvm_vnode.h +++ b/sys/uvm/uvm_vnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_vnode.h,v 1.13 2014/06/29 22:56:31 deraadt Exp $ */ +/* $OpenBSD: uvm_vnode.h,v 1.14 2014/12/16 18:30:04 tedu Exp $ */ /* $NetBSD: uvm_vnode.h,v 1.9 2000/03/26 20:54:48 kleink Exp $ */ /* @@ -45,13 +45,14 @@ */ /* - * the uvm_vnode structure. put at the top of the vnode data structure. - * this allows: - * (struct vnode *) == (struct uvm_vnode *) == (struct uvm_object *) + * the uvm_vnode structure. */ +struct vnode; + struct uvm_vnode { struct uvm_object u_obj; /* the actual VM object */ + struct vnode *u_vnode; /* pointer back to vnode */ int u_flags; /* flags */ int u_nio; /* number of running I/O requests */ voff_t u_size; /* size of object */ -- cgit v1.2.3