summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-06-27 04:58:50 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-06-27 04:58:50 +0000
commit2d089dc551efe8a4004f99b557081ea313891050 (patch)
tree015a91c1480d57159d83fa495068cb7eed8d110b /sys
parentedc9c7f6c9998a46c76c042e4ec02f6dfd1e2f8b (diff)
Remove old vm.
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/common/kern_info_43.c10
-rw-r--r--sys/compat/osf1/osf1_mmap.c55
-rw-r--r--sys/compat/svr4/svr4_misc.c20
-rw-r--r--sys/conf/param.c5
-rw-r--r--sys/ddb/db_command.c12
-rw-r--r--sys/miscfs/kernfs/kernfs_vfsops.c12
-rw-r--r--sys/miscfs/kernfs/kernfs_vnops.c14
-rw-r--r--sys/miscfs/procfs/procfs.h6
-rw-r--r--sys/miscfs/procfs/procfs_cmdline.c24
-rw-r--r--sys/miscfs/procfs/procfs_linux.c23
-rw-r--r--sys/miscfs/procfs/procfs_mem.c155
-rw-r--r--sys/miscfs/procfs/procfs_vfsops.c8
-rw-r--r--sys/miscfs/union/union_subr.c6
-rw-r--r--sys/msdosfs/msdosfs_denode.c10
-rw-r--r--sys/msdosfs/msdosfs_vnops.c10
-rw-r--r--sys/nfs/nfs_bio.c10
-rw-r--r--sys/nfs/nfs_serv.c10
-rw-r--r--sys/nfs/nfs_subs.c10
-rw-r--r--sys/nfs/nfs_vnops.c18
-rw-r--r--sys/ufs/ext2fs/ext2fs_inode.c12
-rw-r--r--sys/ufs/ext2fs/ext2fs_readwrite.c10
-rw-r--r--sys/ufs/ext2fs/ext2fs_vnops.c6
-rw-r--r--sys/ufs/ffs/ffs_alloc.c6
-rw-r--r--sys/ufs/ffs/ffs_balloc.c8
-rw-r--r--sys/ufs/ffs/ffs_inode.c21
-rw-r--r--sys/ufs/ffs/ffs_vnops.c4
-rw-r--r--sys/ufs/ufs/ufs_lookup.c6
-rw-r--r--sys/ufs/ufs/ufs_readwrite.c10
-rw-r--r--sys/ufs/ufs/ufs_vnops.c12
-rw-r--r--sys/xfs/xfs_locl.h4
30 files changed, 31 insertions, 486 deletions
diff --git a/sys/compat/common/kern_info_43.c b/sys/compat/common/kern_info_43.c
index dae4b926ebf..099c651d70c 100644
--- a/sys/compat/common/kern_info_43.c
+++ b/sys/compat/common/kern_info_43.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_info_43.c,v 1.9 1999/02/26 04:09:47 art Exp $ */
+/* $OpenBSD: kern_info_43.c,v 1.10 2001/06/27 04:58:41 art Exp $ */
/* $NetBSD: kern_info_43.c,v 1.5 1996/02/04 02:02:22 christos Exp $ */
/*
@@ -246,21 +246,13 @@ compat_43_sys_getkerninfo(p, v, retval)
case KINFO_METER:
name[0] = VM_METER;
error =
-#if defined(UVM)
uvm_sysctl(name, 1, SCARG(uap, where), &size, NULL, 0, p);
-#else
- vm_sysctl(name, 1, SCARG(uap, where), &size, NULL, 0, p);
-#endif
break;
case KINFO_LOADAVG:
name[0] = VM_LOADAVG;
error =
-#if defined(UVM)
uvm_sysctl(name, 1, SCARG(uap, where), &size, NULL, 0, p);
-#else
- vm_sysctl(name, 1, SCARG(uap, where), &size, NULL, 0, p);
-#endif
break;
case KINFO_CLOCKRATE:
diff --git a/sys/compat/osf1/osf1_mmap.c b/sys/compat/osf1/osf1_mmap.c
index 3a641bda06a..590f9c3af8b 100644
--- a/sys/compat/osf1/osf1_mmap.c
+++ b/sys/compat/osf1/osf1_mmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osf1_mmap.c,v 1.2 2000/11/08 20:32:50 art Exp $ */
+/* $OpenBSD: osf1_mmap.c,v 1.3 2001/06/27 04:58:41 art Exp $ */
/* $NetBSD: osf1_mmap.c,v 1.5 2000/04/11 05:26:27 chs Exp $ */
/*
@@ -116,7 +116,6 @@ osf1_sys_mmap(p, v, retval)
void *v;
register_t *retval;
{
-#if defined(UVM)
struct osf1_sys_mmap_args *uap = v;
struct sys_mmap_args a;
unsigned long leftovers;
@@ -206,58 +205,6 @@ done:
}
return sys_mmap(p, &a, retval);
-#else
- struct osf1_sys_mmap_args /* {
- syscallarg(caddr_t) addr;
- syscallarg(size_t) len;
- syscallarg(int) prot;
- syscallarg(int) flags;
- syscallarg(int) fd;
- syscallarg(off_t) pos;
- } */ *uap = v;
- struct sys_mmap_args /* {
- syscallarg(caddr_t) addr;
- syscallarg(size_t) len;
- syscallarg(int) prot;
- syscallarg(int) flags;
- syscallarg(int) fd;
- syscallarg(long) pad;
- syscallarg(off_t) pos;
- } */ a;
-
- SCARG(&a, addr) = SCARG(uap, addr);
- SCARG(&a, len) = SCARG(uap, len);
- SCARG(&a, prot) = SCARG(uap, prot);
- SCARG(&a, fd) = SCARG(uap, fd);
- SCARG(&a, pad) = 0;
- SCARG(&a, pos) = SCARG(uap, pos);
-
- SCARG(&a, flags) = 0;
- if (SCARG(uap, flags) & OSF1_MAP_SHARED)
- SCARG(&a, flags) |= MAP_SHARED;
- if (SCARG(uap, flags) & OSF1_MAP_PRIVATE)
- SCARG(&a, flags) |= MAP_PRIVATE;
- switch (SCARG(uap, flags) & OSF1_MAP_TYPE) {
- case OSF1_MAP_ANON:
- SCARG(&a, flags) |= MAP_ANON;
- break;
- case OSF1_MAP_FILE:
- SCARG(&a, flags) |= MAP_FILE;
- break;
- default:
- return (EINVAL);
- }
- if (SCARG(uap, flags) & OSF1_MAP_FIXED)
- SCARG(&a, flags) |= MAP_FIXED;
- if (SCARG(uap, flags) & OSF1_MAP_HASSEMAPHORE)
- SCARG(&a, flags) |= MAP_HASSEMAPHORE;
- if (SCARG(uap, flags) & OSF1_MAP_INHERIT)
- SCARG(&a, flags) |= MAP_INHERIT;
- if (SCARG(uap, flags) & OSF1_MAP_UNALIGNED)
- return (EINVAL);
-
- return sys_mmap(p, &a, retval);
-#endif
}
int
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index ca8883ca487..f8cde341b94 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_misc.c,v 1.31 2001/06/21 13:08:15 niklas Exp $ */
+/* $OpenBSD: svr4_misc.c,v 1.32 2001/06/27 04:58:42 art Exp $ */
/* $NetBSD: svr4_misc.c,v 1.42 1996/12/06 03:22:34 christos Exp $ */
/*
@@ -90,9 +90,7 @@
#include <vm/vm.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
static __inline clock_t timeval_to_clock_t __P((struct timeval *));
static int svr4_setinfo __P((struct proc *, int, svr4_siginfo_t *));
@@ -583,18 +581,10 @@ svr4_sys_sysconfig(p, v, retval)
*retval = 3; /* XXX: real, virtual, profiling */
break;
case SVR4_CONFIG_PHYS_PAGES:
-#if defined(UVM)
*retval = uvmexp.npages;
-#else
- *retval = cnt.v_free_count; /* XXX: free instead of total */
-#endif
break;
case SVR4_CONFIG_AVPHYS_PAGES:
-#if defined(UVM)
*retval = uvmexp.active; /* XXX: active instead of avg */
-#else
- *retval = cnt.v_active_count; /* XXX: active instead of avg */
-#endif
break;
default:
return EINVAL;
@@ -683,15 +673,11 @@ svr4_sys_break(p, v, retval)
DPRINTF(("break(3): old %lx new %lx diff %x\n", old, new, diff));
if (diff > 0) {
-#if defined(UVM)
rv = uvm_map(&vm->vm_map, &old, diff, NULL, UVM_UNKNOWN_OFFSET,
UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL, UVM_INH_COPY,
UVM_ADV_NORMAL,
UVM_FLAG_AMAPPAD|UVM_FLAG_FIXED|
UVM_FLAG_OVERLAY|UVM_FLAG_COPYONW));
-#else
- rv = vm_allocate(&vm->vm_map, &old, diff, FALSE);
-#endif
if (rv != KERN_SUCCESS) {
uprintf("sbrk: grow failed, return = %d\n", rv);
return ENOMEM;
@@ -699,11 +685,7 @@ svr4_sys_break(p, v, retval)
vm->vm_dsize += btoc(diff);
} else if (diff < 0) {
diff = -diff;
-#if defined(UVM)
rv = uvm_deallocate(&vm->vm_map, new, diff);
-#else
- rv = vm_deallocate(&vm->vm_map, new, diff);
-#endif
if (rv != KERN_SUCCESS) {
uprintf("sbrk: shrink failed, return = %d\n", rv);
return ENOMEM;
diff --git a/sys/conf/param.c b/sys/conf/param.c
index e288d06566c..33b8ad7edf4 100644
--- a/sys/conf/param.c
+++ b/sys/conf/param.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.c,v 1.12 2001/05/17 18:41:47 provos Exp $ */
+/* $OpenBSD: param.c,v 1.13 2001/06/27 04:58:42 art Exp $ */
/* $NetBSD: param.c,v 1.16 1996/03/12 03:08:40 mrg Exp $ */
/*
@@ -92,9 +92,6 @@ struct timezone tz = { TIMEZONE, DST };
#define NPROC (20 + 16 * MAXUSERS)
int maxproc = NPROC;
#define NTEXT (80 + NPROC / 8) /* actually the object cache */
-#ifndef UVM
-int vm_cache_max = NTEXT; /* XXX these probably needs some measurements */
-#endif
#define NVNODE (NPROC * 2 + NTEXT + 100)
int desiredvnodes = NVNODE;
int maxfiles = 3 * (NPROC + MAXUSERS) + 80;
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index 809487af412..ae9c1aa91c4 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_command.c,v 1.20 2001/04/18 23:17:25 art Exp $ */
+/* $OpenBSD: db_command.c,v 1.21 2001/06/27 04:58:42 art Exp $ */
/* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */
/*
@@ -52,10 +52,8 @@
#include <vm/vm.h>
-#ifdef UVM
#include <uvm/uvm_extern.h>
#include <uvm/uvm_ddb.h>
-#endif
/*
* Exported global variables
@@ -295,11 +293,7 @@ db_map_print_cmd(addr, have_addr, count, modif)
if (modif[0] == 'f')
full = TRUE;
-#if defined(UVM)
uvm_map_printit((vm_map_t) addr, full, db_printf);
-#else
- _vm_map_print((vm_map_t) addr, full, db_printf);
-#endif
}
/*ARGSUSED*/
void
@@ -334,11 +328,7 @@ db_object_print_cmd(addr, have_addr, count, modif)
if (modif[0] == 'f')
full = TRUE;
-#if defined(UVM)
uvm_object_printit((struct uvm_object *) addr, full, db_printf);
-#else
- _vm_object_print((vm_object_t) addr, full, db_printf);
-#endif
}
/*ARGSUSED*/
diff --git a/sys/miscfs/kernfs/kernfs_vfsops.c b/sys/miscfs/kernfs/kernfs_vfsops.c
index 96713bbc6f1..5a04a4f2081 100644
--- a/sys/miscfs/kernfs/kernfs_vfsops.c
+++ b/sys/miscfs/kernfs/kernfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kernfs_vfsops.c,v 1.14 2001/02/20 01:50:09 assar Exp $ */
+/* $OpenBSD: kernfs_vfsops.c,v 1.15 2001/06/27 04:58:42 art Exp $ */
/* $NetBSD: kernfs_vfsops.c,v 1.26 1996/04/22 01:42:27 christos Exp $ */
/*
@@ -53,12 +53,8 @@
#include <sys/namei.h>
#include <sys/malloc.h>
-#if defined(UVM)
#include <vm/vm.h>
#include <uvm/uvm_extern.h> /* for uvmexp */
-#else
-#include <sys/vmmeter.h> /* for cnt */
-#endif
#include <miscfs/specfs/specdev.h>
#include <miscfs/kernfs/kernfs.h>
@@ -251,15 +247,9 @@ kernfs_statfs(mp, sbp, p)
#endif
sbp->f_flags = 0;
-#if defined(UVM)
sbp->f_bsize = uvmexp.pagesize;
sbp->f_iosize = uvmexp.pagesize;
sbp->f_bfree = physmem - uvmexp.wired;
-#else
- sbp->f_bsize = cnt.v_page_size;
- sbp->f_iosize = cnt.v_page_size;
- sbp->f_bfree = physmem - cnt.v_wire_count;
-#endif
sbp->f_blocks = physmem;
sbp->f_bavail = 0;
sbp->f_files = desiredvnodes;
diff --git a/sys/miscfs/kernfs/kernfs_vnops.c b/sys/miscfs/kernfs/kernfs_vnops.c
index d09467aa019..968a613bf7d 100644
--- a/sys/miscfs/kernfs/kernfs_vnops.c
+++ b/sys/miscfs/kernfs/kernfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kernfs_vnops.c,v 1.20 2001/06/23 02:14:25 csapuntz Exp $ */
+/* $OpenBSD: kernfs_vnops.c,v 1.21 2001/06/27 04:58:42 art Exp $ */
/* $NetBSD: kernfs_vnops.c,v 1.43 1996/03/16 23:52:47 christos Exp $ */
/*
@@ -60,12 +60,8 @@
#include <sys/msgbuf.h>
#include <miscfs/kernfs/kernfs.h>
-#if defined(UVM)
#include <vm/vm.h>
#include <uvm/uvm_extern.h>
-#else
-#include <sys/vmmeter.h>
-#endif
#define KSTRING 256 /* Largest I/O available via this filesystem */
#define UIO_MX 32
@@ -105,11 +101,7 @@ struct kern_target kern_targets[] = {
{ DT_REG, N("ostype"), &ostype, KTT_STRING, VREG, READ_MODE },
{ DT_REG, N("osrelease"), &osrelease, KTT_STRING, VREG, READ_MODE },
{ DT_REG, N("osrev"), &osrev, KTT_INT, VREG, READ_MODE },
-#if defined(UVM)
{ DT_REG, N("pagesize"), &uvmexp.pagesize, KTT_INT, VREG, READ_MODE },
-#else
- { DT_REG, N("pagesize"), &cnt.v_page_size, KTT_INT, VREG, READ_MODE },
-#endif
{ DT_REG, N("physmem"), &physmem, KTT_INT, VREG, READ_MODE },
{ DT_REG, N("posix"), &posix, KTT_INT, VREG, READ_MODE },
#if 0
@@ -313,11 +305,7 @@ kernfs_xread(kt, off, bufp, len)
break;
case KTT_USERMEM:
-#if defined(UVM)
sprintf(*bufp, "%u\n", physmem - uvmexp.wired);
-#else
- sprintf(*bufp, "%u\n", physmem - cnt.v_wire_count);
-#endif
break;
#ifdef IPSEC
case KTT_IPSECSPI:
diff --git a/sys/miscfs/procfs/procfs.h b/sys/miscfs/procfs/procfs.h
index 26d9b7b2154..a35112a4f12 100644
--- a/sys/miscfs/procfs/procfs.h
+++ b/sys/miscfs/procfs/procfs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs.h,v 1.12 2001/05/24 07:32:42 aaron Exp $ */
+/* $OpenBSD: procfs.h,v 1.13 2001/06/27 04:58:43 art Exp $ */
/* $NetBSD: procfs.h,v 1.17 1996/02/12 15:01:41 christos Exp $ */
/*
@@ -139,10 +139,6 @@ int procfs_domap __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct
int procfs_freevp __P((struct vnode *));
int procfs_getcpuinfstr __P((char *, int *));
-#if !defined(UVM)
-int procfs_rwmem __P((struct proc *, struct uio *));
-#endif
-
/* functions to check whether or not files should be displayed */
int procfs_validfile __P((struct proc *, struct mount *));
int procfs_validfpregs __P((struct proc *, struct mount *));
diff --git a/sys/miscfs/procfs/procfs_cmdline.c b/sys/miscfs/procfs/procfs_cmdline.c
index 0189e3e9c28..b986a7beeff 100644
--- a/sys/miscfs/procfs/procfs_cmdline.c
+++ b/sys/miscfs/procfs/procfs_cmdline.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_cmdline.c,v 1.1 2000/08/12 04:29:24 jasoni Exp $ */
+/* $OpenBSD: procfs_cmdline.c,v 1.2 2001/06/27 04:58:43 art Exp $ */
/* $NetBSD: procfs_cmdline.c,v 1.3 1999/03/13 22:26:48 thorpej Exp $ */
/*
@@ -49,9 +49,7 @@
#include <miscfs/procfs/procfs.h>
#include <vm/vm.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
/*
* code for returning process's command line arguments
@@ -106,7 +104,6 @@ procfs_docmdline(curp, p, pfs, uio)
/*
* Lock the process down in memory.
*/
-#if defined(UVM)
/* XXXCDC: how should locking work here? */
if ((p->p_flag & P_WEXIT) || (p->p_vmspace->vm_refcnt < 1)) {
free(arg, M_TEMP);
@@ -114,9 +111,6 @@ procfs_docmdline(curp, p, pfs, uio)
}
PHOLD(p);
p->p_vmspace->vm_refcnt++; /* XXX */
-#else
- PHOLD(p);
-#endif
/*
* Read in the ps_strings structure.
@@ -130,11 +124,7 @@ procfs_docmdline(curp, p, pfs, uio)
auio.uio_segflg = UIO_SYSSPACE;
auio.uio_rw = UIO_READ;
auio.uio_procp = NULL;
-#if defined(UVM)
error = uvm_io(&p->p_vmspace->vm_map, &auio);
-#else
- error = procfs_rwmem(p, &auio);
-#endif
if (error)
goto bad;
@@ -150,11 +140,7 @@ procfs_docmdline(curp, p, pfs, uio)
auio.uio_segflg = UIO_SYSSPACE;
auio.uio_rw = UIO_READ;
auio.uio_procp = NULL;
-#if defined(UVM)
error = uvm_io(&p->p_vmspace->vm_map, &auio);
-#else
- error = procfs_rwmem(p, &auio);
-#endif
if (error)
goto bad;
@@ -177,11 +163,7 @@ procfs_docmdline(curp, p, pfs, uio)
auio.uio_segflg = UIO_SYSSPACE;
auio.uio_rw = UIO_READ;
auio.uio_procp = NULL;
-#if defined(UVM)
error = uvm_io(&p->p_vmspace->vm_map, &auio);
-#else
- error = procfs_rwmem(p, &auio);
-#endif
if (error)
goto bad;
@@ -204,12 +186,8 @@ procfs_docmdline(curp, p, pfs, uio)
bad:
-#if defined(UVM)
PRELE(p);
uvmspace_free(p->p_vmspace);
-#else
- PRELE(p);
-#endif
free(arg, M_TEMP);
return (error);
}
diff --git a/sys/miscfs/procfs/procfs_linux.c b/sys/miscfs/procfs/procfs_linux.c
index 8d41775dd35..f8cd17567be 100644
--- a/sys/miscfs/procfs/procfs_linux.c
+++ b/sys/miscfs/procfs/procfs_linux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_linux.c,v 1.2 2001/04/13 01:41:37 miod Exp $ */
+/* $OpenBSD: procfs_linux.c,v 1.3 2001/06/27 04:58:43 art Exp $ */
/* $NetBSD: procfs_linux.c,v 1.2.4.1 2001/03/30 21:48:11 he Exp $ */
/*
@@ -46,9 +46,7 @@
#include <miscfs/procfs/procfs.h>
#include <vm/vm.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
#define PGTOB(p) ((unsigned long)(p) << PAGE_SHIFT)
#define PGTOKB(p) ((unsigned long)(p) << (PAGE_SHIFT - 10))
@@ -75,41 +73,22 @@ procfs_domeminfo(struct proc *curp, struct proc *p, struct pfsnode *pfs,
"Cached: %8lu kB\n"
"SwapTotal: %8lu kB\n"
"SwapFree: %8lu kB\n",
-#if defined(UVM)
PGTOB(uvmexp.npages),
PGTOB(uvmexp.npages - uvmexp.free),
PGTOB(uvmexp.free),
-#else
- 0L,
0L,
0L,
-#endif
- 0L,
0L,
- 0L,
-#if defined(UVM)
PGTOB(uvmexp.swpages),
PGTOB(uvmexp.swpginuse),
PGTOB(uvmexp.swpages - uvmexp.swpginuse),
PGTOKB(uvmexp.npages),
PGTOKB(uvmexp.free),
-#else
- 0L,
- 0L,
0L,
0L,
0L,
-#endif
- 0L,
- 0L,
- 0L,
-#if defined(UVM)
PGTOKB(uvmexp.swpages),
PGTOKB(uvmexp.swpages - uvmexp.swpginuse));
-#else
- 0L,
- 0L);
-#endif
if (len == 0)
return 0;
diff --git a/sys/miscfs/procfs/procfs_mem.c b/sys/miscfs/procfs/procfs_mem.c
index d5e33efc52e..ae553184db3 100644
--- a/sys/miscfs/procfs/procfs_mem.c
+++ b/sys/miscfs/procfs/procfs_mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_mem.c,v 1.11 2001/05/24 07:32:43 aaron Exp $ */
+/* $OpenBSD: procfs_mem.c,v 1.12 2001/06/27 04:58:43 art Exp $ */
/* $NetBSD: procfs_mem.c,v 1.8 1996/02/09 22:40:50 christos Exp $ */
/*
@@ -57,157 +57,10 @@
#include <vm/vm_kern.h>
#include <vm/vm_page.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
#define ISSET(t, f) ((t) & (f))
-#if !defined(UVM)
-int
-procfs_rwmem(p, uio)
- struct proc *p;
- struct uio *uio;
-{
- int error;
- int writing;
-
- writing = uio->uio_rw == UIO_WRITE;
-
- /*
- * Only map in one page at a time. We don't have to, but it
- * makes things easier. This way is trivial - right?
- */
- do {
- vm_map_t map, tmap;
- vm_object_t object;
- vm_offset_t kva;
- vm_offset_t uva;
- int page_offset; /* offset into page */
- vm_offset_t pageno; /* page number */
- vm_map_entry_t out_entry;
- vm_prot_t out_prot;
- vm_page_t m;
- boolean_t wired, single_use;
- vm_offset_t off;
- u_int len;
- int fix_prot;
-
- uva = (vm_offset_t) uio->uio_offset;
- if (uva > VM_MAXUSER_ADDRESS) {
- error = 0;
- break;
- }
-
- /*
- * Get the page number of this segment.
- */
- pageno = trunc_page(uva);
- page_offset = uva - pageno;
-
- /*
- * How many bytes to copy
- */
- len = min(PAGE_SIZE - page_offset, uio->uio_resid);
-
- /*
- * The map we want...
- */
- map = &p->p_vmspace->vm_map;
-
- /*
- * Check the permissions for the area we're interested
- * in.
- */
- fix_prot = 0;
- if (writing)
- fix_prot = !vm_map_check_protection(map, pageno,
- pageno + PAGE_SIZE, VM_PROT_WRITE);
-
- if (fix_prot) {
- /*
- * If the page is not writable, we make it so.
- * XXX It is possible that a page may *not* be
- * read/executable, if a process changes that!
- * We will assume, for now, that a page is either
- * VM_PROT_ALL, or VM_PROT_READ|VM_PROT_EXECUTE.
- */
- error = vm_map_protect(map, pageno,
- pageno + PAGE_SIZE, VM_PROT_ALL, 0);
- if (error)
- break;
- }
-
- /*
- * Now we need to get the page. out_entry, out_prot, wired,
- * and single_use aren't used. One would think the vm code
- * would be a *bit* nicer... We use tmap because
- * vm_map_lookup() can change the map argument.
- */
- tmap = map;
- error = vm_map_lookup(&tmap, pageno,
- writing ? VM_PROT_WRITE : VM_PROT_READ,
- &out_entry, &object, &off, &out_prot,
- &wired, &single_use);
- /*
- * We're done with tmap now.
- */
- if (!error)
- vm_map_lookup_done(tmap, out_entry);
-
- /*
- * Fault the page in...
- */
- if (!error && writing && object->shadow) {
- m = vm_page_lookup(object, off);
- if (m == 0 || (m->flags & PG_COPYONWRITE)) {
-#ifdef __i386__
- pmap_prefault(map, uva, 4);
-#endif
- error = vm_fault(map, pageno,
- VM_PROT_WRITE, FALSE);
- }
- }
-
- /* Find space in kernel_map for the page we're interested in */
- if (!error) {
- kva = VM_MIN_KERNEL_ADDRESS;
- error = vm_map_find(kernel_map, object, off, &kva,
- PAGE_SIZE, 1);
- }
-
- if (!error) {
- /*
- * Neither vm_map_lookup() nor vm_map_find() appear
- * to add a reference count to the object, so we do
- * that here and now.
- */
- vm_object_reference(object);
-
- /*
- * Mark the page we just found as pageable.
- */
- error = vm_map_pageable(kernel_map, kva,
- kva + PAGE_SIZE, 0);
-
- /*
- * Now do the i/o move.
- */
- if (!error)
- error = uiomove((caddr_t) (kva + page_offset),
- len, uio);
-
- vm_map_remove(kernel_map, kva, kva + PAGE_SIZE);
- }
- if (fix_prot)
- vm_map_protect(map, pageno, pageno + PAGE_SIZE,
- VM_PROT_READ|VM_PROT_EXECUTE, 0);
- } while (error == 0 && uio->uio_resid > 0);
-
- return (error);
-}
-#endif
-
/*
* Copy data in and out of the target process.
* We do this by mapping the process's page into
@@ -228,7 +81,6 @@ procfs_domem(curp, p, pfs, uio)
if ((error = procfs_checkioperm(curp, p)) != 0)
return (error);
-#if defined(UVM)
/* XXXCDC: how should locking work here? */
if ((p->p_flag & P_WEXIT) || (p->p_vmspace->vm_refcnt < 1))
return(EFAULT);
@@ -237,11 +89,6 @@ procfs_domem(curp, p, pfs, uio)
error = uvm_io(&p->p_vmspace->vm_map, uio);
PRELE(p);
uvmspace_free(p->p_vmspace);
-#else
- PHOLD(p);
- error = procfs_rwmem(p, uio);
- PRELE(p);
-#endif
return error;
}
diff --git a/sys/miscfs/procfs/procfs_vfsops.c b/sys/miscfs/procfs/procfs_vfsops.c
index 9c1601ca502..e590ae5b14e 100644
--- a/sys/miscfs/procfs/procfs_vfsops.c
+++ b/sys/miscfs/procfs/procfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_vfsops.c,v 1.13 2001/04/09 07:14:23 tholo Exp $ */
+/* $OpenBSD: procfs_vfsops.c,v 1.14 2001/06/27 04:58:44 art Exp $ */
/* $NetBSD: procfs_vfsops.c,v 1.25 1996/02/09 22:40:53 christos Exp $ */
/*
@@ -60,9 +60,7 @@
#include <vm/vm.h> /* for PAGE_SIZE */
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
int procfs_mount __P((struct mount *, const char *, void *,
struct nameidata *, struct proc *));
@@ -183,11 +181,7 @@ procfs_statfs(mp, sbp, p)
{
struct vmtotal vmtotals;
-#if defined(UVM)
uvm_total(&vmtotals);
-#else
- vmtotal(&vmtotals);
-#endif
sbp->f_bsize = PAGE_SIZE;
sbp->f_iosize = PAGE_SIZE;
sbp->f_blocks = vmtotals.t_vm;
diff --git a/sys/miscfs/union/union_subr.c b/sys/miscfs/union/union_subr.c
index d0e5444ec2c..26edd1f0b27 100644
--- a/sys/miscfs/union/union_subr.c
+++ b/sys/miscfs/union/union_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: union_subr.c,v 1.8 1999/02/26 03:32:22 art Exp $ */
+/* $OpenBSD: union_subr.c,v 1.9 2001/06/27 04:58:44 art Exp $ */
/* $NetBSD: union_subr.c,v 1.18 1996/02/09 22:41:10 christos Exp $ */
/*
@@ -302,11 +302,7 @@ union_newsize(vp, uppersz, lowersz)
printf("union: %s size now %ld\n",
uppersz != VNOVAL ? "upper" : "lower", (long) sz);
#endif
-#if defined(UVM)
uvm_vnp_setsize(vp, sz);
-#else
- vnode_pager_setsize(vp, sz);
-#endif
}
}
diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c
index 82187cbd7df..de568c62c90 100644
--- a/sys/msdosfs/msdosfs_denode.c
+++ b/sys/msdosfs/msdosfs_denode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_denode.c,v 1.17 2001/06/23 02:15:24 csapuntz Exp $ */
+/* $OpenBSD: msdosfs_denode.c,v 1.18 2001/06/27 04:58:45 art Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 ws Exp $ */
/*-
@@ -408,11 +408,7 @@ detrunc(dep, length, flags, cred, p)
return (EINVAL);
}
-#if defined(UVM)
uvm_vnp_setsize(DETOV(dep), length);
-#else
- vnode_pager_setsize(DETOV(dep), length);
-#endif
if (dep->de_FileSize < length)
return (deextend(dep, length, cred));
@@ -465,11 +461,7 @@ detrunc(dep, length, flags, cred, p)
#endif
return (error);
}
-#if defined(UVM)
uvm_vnp_uncache(DETOV(dep));
-#else
- vnode_pager_uncache(DETOV(dep)); /* what's this for? */
-#endif
/*
* is this the right place for it?
*/
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index 6c1638b2db1..cd2ced85c87 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vnops.c,v 1.24 2001/06/23 02:15:24 csapuntz Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.25 2001/06/27 04:58:45 art Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */
/*-
@@ -638,17 +638,9 @@ msdosfs_write(v)
n = min(uio->uio_resid, pmp->pm_bpcluster - croffset);
if (uio->uio_offset + n > dep->de_FileSize) {
dep->de_FileSize = uio->uio_offset + n;
-#if defined(UVM)
uvm_vnp_setsize(vp, dep->de_FileSize);
-#else
- vnode_pager_setsize(vp, dep->de_FileSize); /* why? */
-#endif
}
-#if defined(UVM)
uvm_vnp_uncache(vp);
-#else
- (void) vnode_pager_uncache(vp); /* why not? */
-#endif
/*
* Should these vnode_pager_* functions be done on dir
* files?
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c
index aab7a6d4103..20ce213fb5a 100644
--- a/sys/nfs/nfs_bio.c
+++ b/sys/nfs/nfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_bio.c,v 1.21 2001/06/25 05:27:54 csapuntz Exp $ */
+/* $OpenBSD: nfs_bio.c,v 1.22 2001/06/27 04:58:46 art Exp $ */
/* $NetBSD: nfs_bio.c,v 1.25.4.2 1996/07/08 20:47:04 jtc Exp $ */
/*
@@ -346,11 +346,7 @@ nfs_write(v)
/*
* XXX make sure we aren't cached in the VM page cache
*/
-#if defined(UVM)
uvm_vnp_uncache(vp);
-#else
- (void)vnode_pager_uncache(vp);
-#endif
nfsstats.biocache_writes++;
lbn = uio->uio_offset / biosize;
@@ -368,11 +364,7 @@ again:
np->n_flag |= NMODIFIED;
if (uio->uio_offset + n > np->n_size) {
np->n_size = uio->uio_offset + n;
-#if defined(UVM)
uvm_vnp_setsize(vp, (u_long)np->n_size);
-#else
- vnode_pager_setsize(vp, (u_long)np->n_size);
-#endif
}
/*
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index bbec7502a49..1549d6aba55 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_serv.c,v 1.22 2001/06/25 03:28:08 csapuntz Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.23 2001/06/27 04:58:46 art Exp $ */
/* $NetBSD: nfs_serv.c,v 1.25 1996/03/02 15:55:52 jtk Exp $ */
/*
@@ -1651,11 +1651,7 @@ nfsrv_remove(nfsd, slp, procp, mrq)
goto out;
}
if (vp->v_flag & VTEXT)
-#if defined(UVM)
uvm_vnp_uncache(vp);
-#else
- (void) vnode_pager_uncache(vp);
-#endif
out:
if (!error) {
error = VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd);
@@ -3271,11 +3267,7 @@ nfsrv_access(vp, flags, cred, rdonly, p, override)
* the inode, try to free it up once. If
* we fail, we can't allow writing.
*/
-#if defined(UVM)
if ((vp->v_flag & VTEXT) && !uvm_vnp_uncache(vp))
-#else
- if ((vp->v_flag & VTEXT) && !vnode_pager_uncache(vp))
-#endif
return (ETXTBSY);
}
error = VOP_ACCESS(vp, flags, cred, p);
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 539c7c00132..8f955d67864 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.31 2001/06/25 03:28:10 csapuntz Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.32 2001/06/27 04:58:46 art Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -1273,11 +1273,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
np->n_size = vap->va_size;
} else
np->n_size = vap->va_size;
-#if defined(UVM)
uvm_vnp_setsize(vp, np->n_size);
-#else
- vnode_pager_setsize(vp, (u_long)np->n_size);
-#endif
} else
np->n_size = vap->va_size;
}
@@ -1348,11 +1344,7 @@ nfs_getattrcache(vp, vaper)
np->n_size = vap->va_size;
} else
np->n_size = vap->va_size;
-#if defined(UVM)
uvm_vnp_setsize(vp, np->n_size);
-#else
- vnode_pager_setsize(vp, (u_long)np->n_size);
-#endif
} else
np->n_size = vap->va_size;
}
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index db4bf0c2e40..d241b63bb13 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vnops.c,v 1.33 2001/06/25 03:28:13 csapuntz Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.34 2001/06/27 04:58:46 art Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
@@ -377,11 +377,7 @@ nfs_open(v)
if ((error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred,
ap->a_p, 1)) == EINTR)
return (error);
-#if defined(UVM)
uvm_vnp_uncache(vp);
-#else
- (void) vnode_pager_uncache(vp);
-#endif
np->n_attrstamp = 0;
if (vp->v_type == VDIR)
np->n_direofoffset = 0;
@@ -399,11 +395,7 @@ nfs_open(v)
if ((error = nfs_vinvalbuf(vp, V_SAVE,
ap->a_cred, ap->a_p, 1)) == EINTR)
return (error);
-#if defined(UVM)
uvm_vnp_uncache(vp);
-#else
- (void) vnode_pager_uncache(vp);
-#endif
np->n_mtime = vattr.va_mtime.tv_sec;
}
}
@@ -581,11 +573,7 @@ nfs_setattr(v)
return (error);
tsize = np->n_size;
np->n_size = np->n_vattr.va_size = vap->va_size;
-#if defined(UVM)
uvm_vnp_setsize(vp, np->n_size);
-#else
- vnode_pager_setsize(vp, (u_long)np->n_size);
-#endif
};
} else if ((vap->va_mtime.tv_sec != VNOVAL ||
vap->va_atime.tv_sec != VNOVAL) &&
@@ -596,11 +584,7 @@ nfs_setattr(v)
error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_p);
if (error && vap->va_size != VNOVAL) {
np->n_size = np->n_vattr.va_size = tsize;
-#if defined(UVM)
uvm_vnp_setsize(vp, np->n_size);
-#else
- vnode_pager_setsize(vp, (u_long)np->n_size);
-#endif
}
return (error);
}
diff --git a/sys/ufs/ext2fs/ext2fs_inode.c b/sys/ufs/ext2fs/ext2fs_inode.c
index 700dc49d4a7..311b0716640 100644
--- a/sys/ufs/ext2fs/ext2fs_inode.c
+++ b/sys/ufs/ext2fs/ext2fs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_inode.c,v 1.11 2001/06/23 02:07:51 csapuntz Exp $ */
+/* $OpenBSD: ext2fs_inode.c,v 1.12 2001/06/27 04:58:47 art Exp $ */
/* $NetBSD: ext2fs_inode.c,v 1.1 1997/06/11 09:33:56 bouyer Exp $ */
/*
@@ -224,13 +224,8 @@ ext2fs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred)
if (error)
return (error);
oip->i_e2fs_size = length;
-#if defined(UVM)
uvm_vnp_setsize(ovp, length);
uvm_vnp_uncache(ovp);
-#else
- vnode_pager_setsize(ovp, (u_long)length);
- (void) vnode_pager_uncache(ovp);
-#endif
if (aflags & B_SYNC)
bwrite(bp);
else
@@ -259,13 +254,8 @@ ext2fs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred)
return (error);
oip->i_e2fs_size = length;
size = fs->e2fs_bsize;
-#if defined(UVM)
uvm_vnp_setsize(ovp, length);
uvm_vnp_uncache(ovp);
-#else
- vnode_pager_setsize(ovp, (u_long)length);
- (void) vnode_pager_uncache(ovp);
-#endif
bzero((char *)bp->b_data + offset, (u_int)(size - offset));
allocbuf(bp, size);
if (aflags & B_SYNC)
diff --git a/sys/ufs/ext2fs/ext2fs_readwrite.c b/sys/ufs/ext2fs/ext2fs_readwrite.c
index df692010097..a77d20da2c2 100644
--- a/sys/ufs/ext2fs/ext2fs_readwrite.c
+++ b/sys/ufs/ext2fs/ext2fs_readwrite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_readwrite.c,v 1.7 2001/06/23 02:07:51 csapuntz Exp $ */
+/* $OpenBSD: ext2fs_readwrite.c,v 1.8 2001/06/27 04:58:47 art Exp $ */
/* $NetBSD: ext2fs_readwrite.c,v 1.1 1997/06/11 09:34:01 bouyer Exp $ */
/*-
@@ -255,17 +255,9 @@ ext2fs_write(v)
break;
if (uio->uio_offset + xfersize > ip->i_e2fs_size) {
ip->i_e2fs_size = uio->uio_offset + xfersize;
-#if defined(UVM)
uvm_vnp_setsize(vp, ip->i_e2fs_size);
-#else
- vnode_pager_setsize(vp, (u_long)ip->i_e2fs_size);
-#endif
}
-#if defined(UVM)
uvm_vnp_uncache(vp);
-#else
- (void)vnode_pager_uncache(vp);
-#endif
size = fs->e2fs_bsize - bp->b_resid;
if (size < xfersize)
diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c
index e991c350749..ddc13044d71 100644
--- a/sys/ufs/ext2fs/ext2fs_vnops.c
+++ b/sys/ufs/ext2fs/ext2fs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_vnops.c,v 1.13 2001/06/23 02:07:52 csapuntz Exp $ */
+/* $OpenBSD: ext2fs_vnops.c,v 1.14 2001/06/27 04:58:47 art Exp $ */
/* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */
/*
@@ -405,11 +405,7 @@ ext2fs_chmod(vp, mode, cred, p)
ip->i_e2fs_mode |= (mode & ALLPERMS);
ip->i_flag |= IN_CHANGE;
if ((vp->v_flag & VTEXT) && (ip->i_e2fs_mode & S_ISTXT) == 0)
-#if defined(UVM)
(void) uvm_vnp_uncache(vp);
-#else
- (void) vnode_pager_uncache(vp);
-#endif
return (0);
}
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index f5593ee5743..d103755f648 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_alloc.c,v 1.29 2001/06/23 02:07:53 csapuntz Exp $ */
+/* $OpenBSD: ffs_alloc.c,v 1.30 2001/06/27 04:58:48 art Exp $ */
/* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */
/*
@@ -275,11 +275,7 @@ ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp)
ffs_alloccg);
if (bno > 0) {
bp->b_blkno = fsbtodb(fs, bno);
-#if defined(UVM)
(void) uvm_vnp_uncache(ITOV(ip));
-#else
- (void) vnode_pager_uncache(ITOV(ip));
-#endif
if (!DOINGSOFTDEP(ITOV(ip)))
ffs_blkfree(ip, bprev, (long)osize);
if (nsize < request)
diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c
index 0c1d2782a46..ca1389b7079 100644
--- a/sys/ufs/ffs/ffs_balloc.c
+++ b/sys/ufs/ffs/ffs_balloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_balloc.c,v 1.13 2001/06/23 02:07:53 csapuntz Exp $ */
+/* $OpenBSD: ffs_balloc.c,v 1.14 2001/06/27 04:58:48 art Exp $ */
/* $NetBSD: ffs_balloc.c,v 1.3 1996/02/09 22:22:21 christos Exp $ */
/*
@@ -46,9 +46,7 @@
#include <vm/vm.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
#include <ufs/ufs/quota.h>
#include <ufs/ufs/inode.h>
@@ -107,11 +105,7 @@ ffs_balloc(struct inode *ip, off_t startoffset, int size, struct ucred *cred,
fs->fs_bsize, osize, bp);
ip->i_ffs_size = lblktosize(fs, nb + 1);
-#if defined(UVM)
uvm_vnp_setsize(vp, ip->i_ffs_size);
-#else
- vnode_pager_setsize(vp, (u_long)ip->i_ffs_size);
-#endif
ip->i_ffs_db[nb] = dbtofsb(fs, bp->b_blkno);
ip->i_flag |= IN_CHANGE | IN_UPDATE;
if (flags & B_SYNC)
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c
index 284af8362e5..c3ba0924d4d 100644
--- a/sys/ufs/ffs/ffs_inode.c
+++ b/sys/ufs/ffs/ffs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_inode.c,v 1.20 2001/06/23 02:07:54 csapuntz Exp $ */
+/* $OpenBSD: ffs_inode.c,v 1.21 2001/06/27 04:58:48 art Exp $ */
/* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */
/*
@@ -49,9 +49,7 @@
#include <vm/vm.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
#include <ufs/ufs/quota.h>
#include <ufs/ufs/inode.h>
@@ -186,11 +184,7 @@ ffs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred)
if ((error = getinoquota(oip)) != 0)
return (error);
#endif
-#if defined(UVM)
uvm_vnp_setsize(ovp, length);
-#else
- vnode_pager_setsize(ovp, (u_long)length);
-#endif
oip->i_ci.ci_lasta = oip->i_ci.ci_clen
= oip->i_ci.ci_cstart = oip->i_ci.ci_lastw = 0;
@@ -237,13 +231,8 @@ ffs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred)
if (error)
return (error);
oip->i_ffs_size = length;
-#if defined(UVM)
uvm_vnp_setsize(ovp, length);
(void) uvm_vnp_uncache(ovp);
-#else
- vnode_pager_setsize(ovp, (u_long)length);
- (void) vnode_pager_uncache(ovp);
-#endif
if (aflags & B_SYNC)
bwrite(bp);
else
@@ -251,11 +240,7 @@ ffs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred)
oip->i_flag |= IN_CHANGE | IN_UPDATE;
return (UFS_UPDATE(oip, MNT_WAIT));
}
-#if defined(UVM)
uvm_vnp_setsize(ovp, length);
-#else
- vnode_pager_setsize(ovp, (u_long)length);
-#endif
/*
* Shorten the size of the file. If the file is not being
@@ -279,11 +264,7 @@ ffs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred)
return (error);
oip->i_ffs_size = length;
size = blksize(fs, oip, lbn);
-#if defined(UVM)
(void) uvm_vnp_uncache(ovp);
-#else
- (void) vnode_pager_uncache(ovp);
-#endif
if (ovp->v_type != VDIR)
bzero((char *)bp->b_data + offset,
(u_int)(size - offset));
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index a41c5d3d0be..3dac84c2203 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vnops.c,v 1.17 2001/06/23 02:07:55 csapuntz Exp $ */
+/* $OpenBSD: ffs_vnops.c,v 1.18 2001/06/27 04:58:48 art Exp $ */
/* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */
/*
@@ -53,9 +53,7 @@
#include <vm/vm.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
#include <miscfs/specfs/specdev.h>
#include <miscfs/fifofs/fifo.h>
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c
index a9b0805d37a..ca871beca12 100644
--- a/sys/ufs/ufs/ufs_lookup.c
+++ b/sys/ufs/ufs/ufs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_lookup.c,v 1.16 2001/06/23 02:07:57 csapuntz Exp $ */
+/* $OpenBSD: ufs_lookup.c,v 1.17 2001/06/27 04:58:49 art Exp $ */
/* $NetBSD: ufs_lookup.c,v 1.7 1996/02/09 22:36:06 christos Exp $ */
/*
@@ -764,11 +764,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp)
}
dp->i_ffs_size = dp->i_offset + DIRBLKSIZ;
dp->i_flag |= IN_CHANGE | IN_UPDATE;
-#if defined(UVM)
uvm_vnp_setsize(dvp, dp->i_ffs_size);
-#else
- vnode_pager_setsize(dvp, (u_long)dp->i_ffs_size);
-#endif
dirp->d_reclen = DIRBLKSIZ;
blkoff = dp->i_offset &
(VFSTOUFS(dvp->v_mount)->um_mountp->mnt_stat.f_iosize - 1);
diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c
index 3b90471dca6..bbf1391dfe5 100644
--- a/sys/ufs/ufs/ufs_readwrite.c
+++ b/sys/ufs/ufs/ufs_readwrite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_readwrite.c,v 1.18 2001/06/23 02:07:57 csapuntz Exp $ */
+/* $OpenBSD: ufs_readwrite.c,v 1.19 2001/06/27 04:58:49 art Exp $ */
/* $NetBSD: ufs_readwrite.c,v 1.9 1996/05/11 18:27:57 mycroft Exp $ */
/*-
@@ -257,18 +257,10 @@ WRITE(v)
break;
if (uio->uio_offset + xfersize > ip->i_ffs_size) {
ip->i_ffs_size = uio->uio_offset + xfersize;
-#if defined(UVM)
uvm_vnp_setsize(vp, ip->i_ffs_size);
-#else
- vnode_pager_setsize(vp, (u_long)ip->i_ffs_size);
-#endif
extended = 1;
}
-#if defined(UVM)
(void)uvm_vnp_uncache(vp);
-#else
- (void)vnode_pager_uncache(vp);
-#endif
size = BLKSIZE(fs, ip, lbn) - bp->b_resid;
if (size < xfersize)
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 80b4b8e380b..57bf5dc81c3 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_vnops.c,v 1.33 2001/06/23 02:07:57 csapuntz Exp $ */
+/* $OpenBSD: ufs_vnops.c,v 1.34 2001/06/27 04:58:49 art Exp $ */
/* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */
/*
@@ -60,9 +60,7 @@
#include <vm/vm.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
#include <miscfs/specfs/specdev.h>
#include <miscfs/fifofs/fifo.h>
@@ -477,11 +475,7 @@ ufs_chmod(vp, mode, cred, p)
ip->i_ffs_mode |= (mode & ALLPERMS);
ip->i_flag |= IN_CHANGE;
if ((vp->v_flag & VTEXT) && (ip->i_ffs_mode & S_ISTXT) == 0)
-#if defined(UVM)
(void) uvm_vnp_uncache(vp);
-#else
- (void) vnode_pager_uncache(vp);
-#endif
return (0);
}
@@ -1375,11 +1369,7 @@ ufs_mkdir(v)
goto bad;
ip->i_ffs_size = DIRBLKSIZ;
ip->i_flag |= IN_CHANGE | IN_UPDATE;
-#if defined(UVM)
uvm_vnp_setsize(tvp, ip->i_ffs_size);
-#else
- vnode_pager_setsize(tvp, (u_long)ip->i_ffs_size);
-#endif
bcopy((caddr_t)&dirtemplate, (caddr_t)bp->b_data, sizeof dirtemplate);
if (DOINGSOFTDEP(tvp)) {
/*
diff --git a/sys/xfs/xfs_locl.h b/sys/xfs/xfs_locl.h
index d33b4ab64ad..b46093e0bb4 100644
--- a/sys/xfs/xfs_locl.h
+++ b/sys/xfs/xfs_locl.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*/
-/* $Id: xfs_locl.h,v 1.3 2000/09/11 14:26:52 art Exp $ */
+/* $Id: xfs_locl.h,v 1.4 2001/06/27 04:58:49 art Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -268,7 +268,7 @@ struct xfs_setgroups_args{
#define xfs_vfs_object_create(vp,proc,ucred) vfs_object_create(vp,proc,ucred)
#endif
-#ifdef UVM
+#ifdef __OpenBSD__
#define xfs_set_vp_size(vp, sz) uvm_vnp_setsize(vp, sz)
#elif HAVE_KERNEL_VNODE_PAGER_SETSIZE
#define xfs_set_vp_size(vp, sz) vnode_pager_setsize(vp, sz)