summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-12-10 02:19:35 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-12-10 02:19:35 +0000
commitb1d070269012496fc9ea43ab62f9f6d4c6855c86 (patch)
treeaf8fabc460253582a3035edc55928b90b5ff6cf7 /sys
parentba38727131150bb5ee5ae61df8d315ded024e57d (diff)
Merge in struct uvm_vnode into struct vnode.
Diffstat (limited to 'sys')
-rw-r--r--sys/adosfs/advnops.c4
-rw-r--r--sys/isofs/cd9660/cd9660_vnops.c4
-rw-r--r--sys/kern/vfs_default.c14
-rw-r--r--sys/kern/vfs_subr.c28
-rw-r--r--sys/kern/vfs_vnops.c8
-rw-r--r--sys/msdosfs/msdosfs_denode.c4
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c4
-rw-r--r--sys/msdosfs/msdosfs_vnops.c22
-rw-r--r--sys/nfs/nfs_bio.c32
-rw-r--r--sys/nfs/nfs_subs.c8
-rw-r--r--sys/nfs/nfs_vfsops.c4
-rw-r--r--sys/nfs/nfs_vnops.c4
-rw-r--r--sys/sys/vnode.h16
-rw-r--r--sys/ufs/ext2fs/ext2fs_balloc.c8
-rw-r--r--sys/ufs/ext2fs/ext2fs_readwrite.c12
-rw-r--r--sys/ufs/ext2fs/ext2fs_vfsops.c4
-rw-r--r--sys/ufs/ffs/ffs_balloc.c4
-rw-r--r--sys/ufs/ffs/ffs_inode.c6
-rw-r--r--sys/ufs/ffs/ffs_softdep.c4
-rw-r--r--sys/ufs/ffs/ffs_vnops.c4
-rw-r--r--sys/ufs/ufs/ufs_inode.c10
-rw-r--r--sys/ufs/ufs/ufs_readwrite.c29
-rw-r--r--sys/uvm/uvm_bio.c6
-rw-r--r--sys/uvm/uvm_mmap.c3
-rw-r--r--sys/uvm/uvm_vnode.c68
-rw-r--r--sys/uvm/uvm_vnode.h60
26 files changed, 153 insertions, 217 deletions
diff --git a/sys/adosfs/advnops.c b/sys/adosfs/advnops.c
index 5f3fac9977d..08b2dd3b7ac 100644
--- a/sys/adosfs/advnops.c
+++ b/sys/adosfs/advnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: advnops.c,v 1.19 2001/12/04 22:44:31 art Exp $ */
+/* $OpenBSD: advnops.c,v 1.20 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: advnops.c,v 1.32 1996/10/13 02:52:09 christos Exp $ */
/*
@@ -286,7 +286,7 @@ adosfs_read(v)
if (bytelen == 0) {
break;
}
- win = ubc_alloc(&sp->a_vp->v_uvm.u_obj, uio->uio_offset,
+ win = ubc_alloc(&sp->a_vp->v_uobj, uio->uio_offset,
&bytelen, UBC_READ);
error = uiomove(win, bytelen, uio);
ubc_release(win, 0);
diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c
index 395769c7d6e..28e6dfaecef 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.16 2001/12/04 22:44:31 art Exp $ */
+/* $OpenBSD: cd9660_vnops.c,v 1.17 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */
/*-
@@ -339,7 +339,7 @@ cd9660_read(v)
if (bytelen == 0)
break;
- win = ubc_alloc(&vp->v_uvm.u_obj, uio->uio_offset,
+ win = ubc_alloc(&vp->v_uobj, uio->uio_offset,
&bytelen, UBC_READ);
error = uiomove(win, bytelen, uio);
ubc_release(win, 0);
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index d857390b0ec..df32acf1323 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_default.c,v 1.13 2001/12/04 22:44:31 art Exp $ */
+/* $OpenBSD: vfs_default.c,v 1.14 2001/12/10 02:19:34 art Exp $ */
/*
* Portions of this code are:
@@ -343,7 +343,7 @@ genfs_getpages(v)
vaddr_t kva;
struct buf *bp, *mbp;
struct vnode *vp = ap->a_vp;
- struct uvm_object *uobj = &vp->v_uvm.u_obj;
+ struct uvm_object *uobj = &vp->v_uobj;
struct vm_page *pgs[16]; /* XXXUBC 16 */
struct ucred *cred = curproc->p_ucred; /* XXXUBC curproc */
boolean_t async = (flags & PGO_SYNCIO) == 0;
@@ -363,13 +363,13 @@ genfs_getpages(v)
error = 0;
origoffset = ap->a_offset;
orignpages = *ap->a_count;
- error = VOP_SIZE(vp, vp->v_uvm.u_size, &diskeof);
+ error = VOP_SIZE(vp, vp->v_size, &diskeof);
if (error) {
return error;
}
if (flags & PGO_PASTEOF) {
- newsize = MAX(vp->v_uvm.u_size,
- origoffset + (orignpages << PAGE_SHIFT));
+ newsize = MAX(vp->v_size,
+ origoffset + (orignpages << PAGE_SHIFT));
error = VOP_SIZE(vp, newsize, &memeof);
if (error) {
return error;
@@ -855,9 +855,9 @@ genfs_putpages(v)
UVMHIST_LOG(ubchist, "vp %p offset 0x%x count %d",
vp, ap->a_m[0]->offset, ap->a_count, 0);
- simple_unlock(&vp->v_uvm.u_obj.vmobjlock);
+ simple_unlock(&vp->v_uobj.vmobjlock);
- error = VOP_SIZE(vp, vp->v_uvm.u_size, &eof);
+ error = VOP_SIZE(vp, vp->v_size, &eof);
if (error) {
return error;
}
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 4ff7c36f128..723d837c606 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.76 2001/12/05 00:24:36 art Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.77 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -468,16 +468,16 @@ getnewvnode(tag, mp, vops, vpp)
*vpp = vp;
vp->v_usecount = 1;
vp->v_data = 0;
- simple_lock_init(&vp->v_uvm.u_obj.vmobjlock);
+ simple_lock_init(&vp->v_uobj.vmobjlock);
/*
* initialize uvm_object within vnode.
*/
- uobj = &vp->v_uvm.u_obj;
+ uobj = &vp->v_uobj;
uobj->pgops = &uvm_vnodeops;
TAILQ_INIT(&uobj->memq);
- vp->v_uvm.u_size = VSIZENOTSET;
+ vp->v_size = VSIZENOTSET;
return (0);
}
@@ -805,8 +805,8 @@ vput(vp)
vputonfreelist(vp);
if (vp->v_flag & VTEXT) {
- uvmexp.vtextpages -= vp->v_uvm.u_obj.uo_npages;
- uvmexp.vnodepages += vp->v_uvm.u_obj.uo_npages;
+ uvmexp.vtextpages -= vp->v_uobj.uo_npages;
+ uvmexp.vnodepages += vp->v_uobj.uo_npages;
}
vp->v_flag &= ~VTEXT;
simple_unlock(&vp->v_interlock);
@@ -850,8 +850,8 @@ vrele(vp)
vputonfreelist(vp);
if (vp->v_flag & VTEXT) {
- uvmexp.vtextpages -= vp->v_uvm.u_obj.uo_npages;
- uvmexp.vnodepages += vp->v_uvm.u_obj.uo_npages;
+ uvmexp.vtextpages -= vp->v_uobj.uo_npages;
+ uvmexp.vnodepages += vp->v_uobj.uo_npages;
}
vp->v_flag &= ~VTEXT;
if (vn_lock(vp, LK_EXCLUSIVE|LK_INTERLOCK, p) == 0)
@@ -1063,8 +1063,8 @@ vclean(vp, flags, p)
panic("vclean: deadlock");
vp->v_flag |= VXLOCK;
if (vp->v_flag & VTEXT) {
- uvmexp.vtextpages -= vp->v_uvm.u_obj.uo_npages;
- uvmexp.vnodepages += vp->v_uvm.u_obj.uo_npages;
+ uvmexp.vtextpages -= vp->v_uobj.uo_npages;
+ uvmexp.vnodepages += vp->v_uobj.uo_npages;
}
vp->v_flag &= ~VTEXT;
@@ -2023,7 +2023,7 @@ vinvalbuf(vp, flags, cred, p, slpflag, slptimeo)
struct proc *p;
int slpflag, slptimeo;
{
- struct uvm_object *uobj = &vp->v_uvm.u_obj;
+ struct uvm_object *uobj = &vp->v_uobj;
struct buf *bp;
struct buf *nbp, *blist;
int s, error, rv;
@@ -2111,7 +2111,7 @@ vflushbuf(vp, sync)
struct vnode *vp;
int sync;
{
- struct uvm_object *uobj = &vp->v_uvm.u_obj;
+ struct uvm_object *uobj = &vp->v_uobj;
struct buf *bp, *nbp;
int s;
@@ -2200,7 +2200,7 @@ brelvp(struct buf *bp)
*/
if (bp->b_vnbufs.le_next != NOLIST)
bufremvn(bp);
- if (TAILQ_EMPTY(&vp->v_uvm.u_obj.memq) &&
+ if (TAILQ_EMPTY(&vp->v_uobj.memq) &&
(vp->v_bioflag & VBIOONSYNCLIST) &&
LIST_FIRST(&vp->v_dirtyblkhd) == NULL) {
vp->v_bioflag &= ~VBIOONSYNCLIST;
@@ -2265,7 +2265,7 @@ reassignbuf(bp)
*/
if ((bp->b_flags & B_DELWRI) == 0) {
listheadp = &vp->v_cleanblkhd;
- if (TAILQ_EMPTY(&vp->v_uvm.u_obj.memq) &&
+ if (TAILQ_EMPTY(&vp->v_uobj.memq) &&
(vp->v_bioflag & VBIOONSYNCLIST) &&
LIST_FIRST(&vp->v_dirtyblkhd) == NULL) {
vp->v_bioflag &= ~VBIOONSYNCLIST;
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 491db1172fa..8f13ae65dd0 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vnops.c,v 1.36 2001/11/27 05:27:12 art Exp $ */
+/* $OpenBSD: vfs_vnops.c,v 1.37 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */
/*
@@ -219,8 +219,8 @@ vn_marktext(vp)
struct vnode *vp;
{
if ((vp->v_flag & VTEXT) == 0) {
- uvmexp.vnodepages -= vp->v_uvm.u_obj.uo_npages;
- uvmexp.vtextpages += vp->v_uvm.u_obj.uo_npages;
+ uvmexp.vnodepages -= vp->v_uobj.uo_npages;
+ uvmexp.vtextpages += vp->v_uobj.uo_npages;
#if 0
/*
* Doesn't help much because the pager is borked and ubc_flush is
@@ -231,7 +231,7 @@ vn_marktext(vp)
* Get rid of any cached reads from this vnode.
* exec can't respect PMAP_PREFER when mapping the text.
*/
- ubc_flush(&vp->v_uvm.u_obj, 0, 0);
+ ubc_flush(&vp->v_uobj, 0, 0);
#endif
#endif
}
diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c
index f4ab33d5272..601ac17df6b 100644
--- a/sys/msdosfs/msdosfs_denode.c
+++ b/sys/msdosfs/msdosfs_denode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_denode.c,v 1.20 2001/11/27 05:27:12 art Exp $ */
+/* $OpenBSD: msdosfs_denode.c,v 1.21 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 ws Exp $ */
/*-
@@ -334,7 +334,7 @@ retry:
nvp->v_type = VREG;
VREF(ldep->de_devvp);
*depp = ldep;
- nvp->v_uvm.u_size = ldep->de_FileSize;
+ nvp->v_size = ldep->de_FileSize;
return (0);
}
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index 63175e08754..60162fa8af9 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vfsops.c,v 1.26 2001/11/27 05:27:12 art Exp $ */
+/* $OpenBSD: msdosfs_vfsops.c,v 1.27 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
/*-
@@ -718,7 +718,7 @@ msdosfs_sync_vnode(struct vnode *vp, void *arg)
(((dep->de_flag &
(DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0) &&
(LIST_EMPTY(&vp->v_dirtyblkhd) &&
- vp->v_uvm.u_obj.uo_npages == 0))) {
+ vp->v_uobj.uo_npages == 0))) {
simple_unlock(&vp->v_interlock);
return (0);
}
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index c62141667f8..91b3196ced1 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vnops.c,v 1.32 2001/12/04 22:44:32 art Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.33 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */
/*-
@@ -441,7 +441,7 @@ msdosfs_read(v)
if (bytelen == 0)
break;
- win = ubc_alloc(&vp->v_uvm.u_obj, uio->uio_offset,
+ win = ubc_alloc(&vp->v_uobj, uio->uio_offset,
&bytelen, UBC_READ);
error = uiomove(win, bytelen, uio);
ubc_release(win, 0);
@@ -602,7 +602,7 @@ msdosfs_write(v)
if (bytelen == 0)
break;
- win = ubc_alloc(&vp->v_uvm.u_obj, oldoff, &bytelen, UBC_WRITE);
+ win = ubc_alloc(&vp->v_uobj, oldoff, &bytelen, UBC_WRITE);
error = uiomove(win, bytelen, uio);
ubc_release(win, 0);
if (error) {
@@ -614,17 +614,17 @@ msdosfs_write(v)
*/
if (ioflag & IO_SYNC) {
- simple_lock(&vp->v_uvm.u_obj.vmobjlock);
- rv = vp->v_uvm.u_obj.pgops->pgo_flush(
- &vp->v_uvm.u_obj, oldoff,
+ simple_lock(&vp->v_uobj.vmobjlock);
+ rv = vp->v_uobj.pgops->pgo_flush(
+ &vp->v_uobj, oldoff,
oldoff + bytelen, PGO_CLEANIT|PGO_SYNCIO);
- simple_unlock(&vp->v_uvm.u_obj.vmobjlock);
+ simple_unlock(&vp->v_uobj.vmobjlock);
} else if (oldoff >> 16 != uio->uio_offset >> 16) {
- simple_lock(&vp->v_uvm.u_obj.vmobjlock);
- rv = vp->v_uvm.u_obj.pgops->pgo_flush(
- &vp->v_uvm.u_obj, (oldoff >> 16) << 16,
+ simple_lock(&vp->v_uobj.vmobjlock);
+ rv = vp->v_uobj.pgops->pgo_flush(
+ &vp->v_uobj, (oldoff >> 16) << 16,
(uio->uio_offset >> 16) << 16, PGO_CLEANIT);
- simple_unlock(&vp->v_uvm.u_obj.vmobjlock);
+ simple_unlock(&vp->v_uobj.vmobjlock);
}
} while (error == 0 && uio->uio_resid > 0);
dep->de_flag |= DE_UPDATE;
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c
index 2aa06ce249f..3d2a7934b8f 100644
--- a/sys/nfs/nfs_bio.c
+++ b/sys/nfs/nfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_bio.c,v 1.30 2001/11/30 18:58:18 art Exp $ */
+/* $OpenBSD: nfs_bio.c,v 1.31 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: nfs_bio.c,v 1.25.4.2 1996/07/08 20:47:04 jtc Exp $ */
/*
@@ -161,7 +161,7 @@ nfs_bioread(vp, uio, ioflag, cred)
if (bytelen == 0)
break;
- win = ubc_alloc(&vp->v_uvm.u_obj, uio->uio_offset,
+ win = ubc_alloc(&vp->v_uobj, uio->uio_offset,
&bytelen, UBC_READ);
error = uiomove(win, bytelen, uio);
ubc_release(win, 0);
@@ -307,28 +307,28 @@ nfs_write(v)
np->n_size = uio->uio_offset + bytelen;
uvm_vnp_setsize(vp, np->n_size);
}
- win = ubc_alloc(&vp->v_uvm.u_obj, uio->uio_offset, &bytelen,
+ win = ubc_alloc(&vp->v_uobj, uio->uio_offset, &bytelen,
UBC_WRITE);
error = uiomove(win, bytelen, uio);
ubc_release(win, 0);
rv = 1;
if ((ioflag & IO_SYNC)) {
- simple_lock(&vp->v_uvm.u_obj.vmobjlock);
- rv = vp->v_uvm.u_obj.pgops->pgo_flush(
- &vp->v_uvm.u_obj,
+ simple_lock(&vp->v_uobj.vmobjlock);
+ rv = vp->v_uobj.pgops->pgo_flush(
+ &vp->v_uobj,
oldoff & ~(nmp->nm_wsize - 1),
uio->uio_offset & ~(nmp->nm_wsize - 1),
PGO_CLEANIT|PGO_SYNCIO);
- simple_unlock(&vp->v_uvm.u_obj.vmobjlock);
+ simple_unlock(&vp->v_uobj.vmobjlock);
} else if ((oldoff & ~(nmp->nm_wsize - 1)) !=
(uio->uio_offset & ~(nmp->nm_wsize - 1))) {
- simple_lock(&vp->v_uvm.u_obj.vmobjlock);
- rv = vp->v_uvm.u_obj.pgops->pgo_flush(
- &vp->v_uvm.u_obj,
+ simple_lock(&vp->v_uobj.vmobjlock);
+ rv = vp->v_uobj.pgops->pgo_flush(
+ &vp->v_uobj,
oldoff & ~(nmp->nm_wsize - 1),
uio->uio_offset & ~(nmp->nm_wsize - 1),
PGO_CLEANIT|PGO_WEAK);
- simple_unlock(&vp->v_uvm.u_obj.vmobjlock);
+ simple_unlock(&vp->v_uobj.vmobjlock);
}
if (!rv) {
error = EIO;
@@ -589,7 +589,7 @@ nfs_getpages(v)
struct buf *bp, *mbp;
struct vnode *vp = ap->a_vp;
struct nfsnode *np = VTONFS(vp);
- struct uvm_object *uobj = &vp->v_uvm.u_obj;
+ struct uvm_object *uobj = &vp->v_uobj;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
size_t bytes, iobytes, tailbytes, totalbytes, skipbytes;
int flags = ap->a_flags;
@@ -613,7 +613,7 @@ nfs_getpages(v)
error = 0;
origoffset = ap->a_offset;
- eof = vp->v_uvm.u_size;
+ eof = vp->v_size;
if (origoffset >= eof) {
if ((flags & PGO_LOCKED) == 0) {
simple_unlock(&uobj->vmobjlock);
@@ -744,7 +744,7 @@ nfs_getpages(v)
*/
totalbytes = npages << PAGE_SHIFT;
- bytes = MIN(totalbytes, vp->v_uvm.u_size - startoffset);
+ bytes = MIN(totalbytes, vp->v_size - startoffset);
tailbytes = totalbytes - bytes;
skipbytes = 0;
@@ -999,11 +999,11 @@ nfs_putpages(v)
UVMHIST_LOG(ubchist, "vp %p pgp %p count %d",
vp, ap->a_m, ap->a_count,0);
- simple_unlock(&vp->v_uvm.u_obj.vmobjlock);
+ simple_unlock(&vp->v_uobj.vmobjlock);
error = 0;
origoffset = pgs[0]->offset;
- bytes = MIN(ap->a_count << PAGE_SHIFT, vp->v_uvm.u_size - origoffset);
+ bytes = MIN(ap->a_count << PAGE_SHIFT, vp->v_size - origoffset);
skipbytes = 0;
/*
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 4a8bc11528d..efee3069743 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.36 2001/11/27 05:27:12 art Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.37 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -1786,11 +1786,11 @@ nfs_clearcommit(mp)
np->n_pushedhi = 0;
np->n_commitflags &=
~(NFS_COMMIT_PUSH_VALID | NFS_COMMIT_PUSHED_VALID);
- simple_lock(&vp->v_uvm.u_obj.vmobjlock);
- TAILQ_FOREACH(pg, &vp->v_uvm.u_obj.memq, listq) {
+ simple_lock(&vp->v_uobj.vmobjlock);
+ TAILQ_FOREACH(pg, &vp->v_uobj.memq, listq) {
pg->flags &= ~PG_NEEDCOMMIT;
}
- simple_unlock(&vp->v_uvm.u_obj.vmobjlock);
+ simple_unlock(&vp->v_uobj.vmobjlock);
}
splx(s);
}
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 91f84da52b6..2efb7eacd02 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vfsops.c,v 1.39 2001/11/27 05:27:12 art Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.40 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
@@ -860,7 +860,7 @@ loop:
goto loop;
if (waitfor == MNT_LAZY || VOP_ISLOCKED(vp) ||
(LIST_EMPTY(&vp->v_dirtyblkhd) &&
- vp->v_uvm.u_obj.uo_npages == 0))
+ vp->v_uobj.uo_npages == 0))
continue;
if (vget(vp, LK_EXCLUSIVE, p))
goto loop;
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index 7aceef9300e..34831240777 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vnops.c,v 1.41 2001/12/04 22:44:32 art Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.42 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
@@ -2659,7 +2659,7 @@ nfs_flush(vp, cred, waitfor, p, commit)
struct proc *p;
int commit;
{
- struct uvm_object *uobj = &vp->v_uvm.u_obj;
+ struct uvm_object *uobj = &vp->v_uobj;
struct nfsnode *np = VTONFS(vp);
int error;
int flushflags = PGO_ALLPAGES|PGO_CLEANIT|PGO_SYNCIO;
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 9e6c38cebc5..77d773afe17 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnode.h,v 1.44 2001/12/05 00:24:36 art Exp $ */
+/* $OpenBSD: vnode.h,v 1.45 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
@@ -45,7 +45,6 @@
#include <uvm/uvm_pglist.h> /* XXX */
#include <sys/lock.h> /* XXX */
#include <uvm/uvm.h> /* XXX */
-#include <uvm/uvm_vnode.h> /* XXX */
/*
* The vnode is the focus of all file activity in UNIX. There is a
@@ -87,13 +86,14 @@ LIST_HEAD(buflists, buf);
*/
struct vnode {
- struct uvm_vnode v_uvm; /* uvm data */
+ struct uvm_object v_uobj; /* the VM object */
+#define v_usecount v_uobj.uo_refs
+#define v_interlock v_uobj.vmobjlock
+ voff_t v_size;
+ int v_flag;
+ int v_numoutput;
int (**v_op) __P((void *)); /* vnode operations vector */
enum vtype v_type; /* vnode type */
-#define v_flag v_uvm.u_flags
-#define v_usecount v_uvm.u_obj.uo_refs
-#define v_interlock v_uvm.u_obj.vmobjlock
-#define v_numoutput v_uvm.u_nio
/* reference count of writers */
u_int v_writecount;
/* Flags that can be read/written in interrupts */
@@ -114,7 +114,7 @@ struct vnode {
} v_un;
struct lock *v_vnlock; /* used for non-locking fs's */
- struct lock v_glock; /* getpage lock */
+ struct lock v_glock; /* getpages lock */
enum vtagtype v_tag; /* type of underlying data */
void *v_data; /* private data for fs */
struct {
diff --git a/sys/ufs/ext2fs/ext2fs_balloc.c b/sys/ufs/ext2fs/ext2fs_balloc.c
index 78fb0a8371c..a6daf74d8c6 100644
--- a/sys/ufs/ext2fs/ext2fs_balloc.c
+++ b/sys/ufs/ext2fs/ext2fs_balloc.c
@@ -362,7 +362,7 @@ ext2fs_ballocn(v)
UVMHIST_LOG(ubchist, "old 0x%x new 0x%x",
ip->i_e2fs_size, off + bsize,0,0);
ip->i_e2fs_size = off + bsize;
- if (vp->v_uvm.u_size < ip->i_e2fs_size) {
+ if (vp->v_size < ip->i_e2fs_size) {
uvm_vnp_setsize(vp, ip->i_e2fs_size);
}
}
@@ -396,11 +396,11 @@ ext2fs_balloc_range(vp, off, len, cred, flags)
struct vm_page *pgs[ppb];
UVMHIST_FUNC("ext2fs_balloc_range"); UVMHIST_CALLED(ubchist);
UVMHIST_LOG(ubchist, "vp %p off 0x%x len 0x%x u_size 0x%x",
- vp, off, len, vp->v_uvm.u_size);
+ vp, off, len, vp->v_size);
error = 0;
- uobj = &vp->v_uvm.u_obj;
- oldeof = vp->v_uvm.u_size;
+ uobj = &vp->v_uobj;
+ oldeof = vp->v_size;
eof = max(oldeof, off + len);
UVMHIST_LOG(ubchist, "new eof 0x%x", eof,0,0,0);
pgs[0] = NULL;
diff --git a/sys/ufs/ext2fs/ext2fs_readwrite.c b/sys/ufs/ext2fs/ext2fs_readwrite.c
index 94424055733..03768d06b42 100644
--- a/sys/ufs/ext2fs/ext2fs_readwrite.c
+++ b/sys/ufs/ext2fs/ext2fs_readwrite.c
@@ -119,7 +119,7 @@ ext2fs_read(v)
if (bytelen == 0) {
break;
}
- win = ubc_alloc(&vp->v_uvm.u_obj, uio->uio_offset,
+ win = ubc_alloc(&vp->v_uobj, uio->uio_offset,
&bytelen, UBC_READ);
error = uiomove(win, bytelen, uio);
ubc_release(win, 0);
@@ -281,7 +281,7 @@ ext2fs_write(v)
if (error) {
break;
}
- win = ubc_alloc(&vp->v_uvm.u_obj, uio->uio_offset,
+ win = ubc_alloc(&vp->v_uobj, uio->uio_offset,
&bytelen, UBC_WRITE);
error = uiomove(win, bytelen, uio);
ubc_release(win, 0);
@@ -295,11 +295,11 @@ ext2fs_write(v)
*/
if (oldoff >> 16 != uio->uio_offset >> 16) {
- simple_lock(&vp->v_uvm.u_obj.vmobjlock);
- rv = vp->v_uvm.u_obj.pgops->pgo_flush(
- &vp->v_uvm.u_obj, (oldoff >> 16) << 16,
+ simple_lock(&vp->v_uobj.vmobjlock);
+ rv = vp->v_uobj.pgops->pgo_flush(
+ &vp->v_uobj, (oldoff >> 16) << 16,
(uio->uio_offset >> 16) << 16, PGO_CLEANIT);
- simple_unlock(&vp->v_uvm.u_obj.vmobjlock);
+ simple_unlock(&vp->v_uobj.vmobjlock);
}
}
goto out;
diff --git a/sys/ufs/ext2fs/ext2fs_vfsops.c b/sys/ufs/ext2fs/ext2fs_vfsops.c
index e438268acbc..87eab5f5c2b 100644
--- a/sys/ufs/ext2fs/ext2fs_vfsops.c
+++ b/sys/ufs/ext2fs/ext2fs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_vfsops.c,v 1.17 2001/11/27 05:27:12 art Exp $ */
+/* $OpenBSD: ext2fs_vfsops.c,v 1.18 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: ext2fs_vfsops.c,v 1.40 2000/11/27 08:39:53 chs Exp $ */
/*
@@ -930,7 +930,7 @@ ext2fs_vget(mp, ino, vpp)
ip->i_flag |= IN_MODIFIED;
}
- vp->v_uvm.u_size = ip->i_e2fs_size;
+ vp->v_size = ip->i_e2fs_size;
*vpp = vp;
return (0);
}
diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c
index 5f6ddc3d94e..dfbf97c232c 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.19 2001/11/27 05:27:12 art Exp $ */
+/* $OpenBSD: ffs_balloc.c,v 1.20 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: ffs_balloc.c,v 1.3 1996/02/09 22:22:21 christos Exp $ */
/*
@@ -448,7 +448,7 @@ ffs_ballocn(v)
if (ip->i_ffs_size < off + bsize) {
ip->i_ffs_size = off + bsize;
- if (vp->v_uvm.u_size < ip->i_ffs_size) {
+ if (vp->v_size < ip->i_ffs_size) {
uvm_vnp_setsize(vp, ip->i_ffs_size);
}
}
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c
index cddf6a368ca..64f0aef27a3 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.26 2001/11/27 05:27:12 art Exp $ */
+/* $OpenBSD: ffs_inode.c,v 1.27 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */
/*
@@ -228,11 +228,11 @@ ffs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred)
size = blksize(fs, oip, lblkno(fs, length));
eoz = min(lblktosize(fs, lblkno(fs, length)) + size, osize);
uvm_vnp_zerorange(ovp, length, eoz - length);
- uobj = &ovp->v_uvm.u_obj;
+ uobj = &ovp->v_uobj;
simple_lock(&uobj->vmobjlock);
uobj->pgops->pgo_flush(uobj, length, eoz,
PGO_CLEANIT|PGO_DEACTIVATE|PGO_SYNCIO);
- simple_unlock(&ovp->v_uvm.u_obj.vmobjlock);
+ simple_unlock(&uobj->vmobjlock);
}
lockmgr(&ovp->v_glock, LK_EXCLUSIVE, NULL, p);
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 624a862f3e7..2dfed4d83bd 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_softdep.c,v 1.29 2001/12/05 00:36:17 niklas Exp $ */
+/* $OpenBSD: ffs_softdep.c,v 1.30 2001/12/10 02:19:34 art Exp $ */
/*
* Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved.
*
@@ -4362,7 +4362,7 @@ flush_inodedep_deps(fs, ino)
if (vp == NULL)
panic("flush_inodedep_deps: null vp");
#endif
- uobj = &vp->v_uvm.u_obj;
+ uobj = &vp->v_uobj;
/*
* This work is done in two passes. The first pass grabs most
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index f3cfb4c3f46..6bf1ddc5642 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.22 2001/12/04 22:44:32 art Exp $ */
+/* $OpenBSD: ffs_vnops.c,v 1.23 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */
/*
@@ -252,7 +252,7 @@ ffs_fsync(v)
s = splbio();
if (vp->v_type == VREG) {
- uobj = &vp->v_uvm.u_obj;
+ uobj = &vp->v_uobj;
simple_lock(&uobj->vmobjlock);
(uobj->pgops->pgo_flush)(uobj, 0, 0, PGO_ALLPAGES|PGO_CLEANIT|
((ap->a_waitfor == MNT_WAIT) ? PGO_SYNCIO : 0));
diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c
index c86f6d7d274..8c328b83f39 100644
--- a/sys/ufs/ufs/ufs_inode.c
+++ b/sys/ufs/ufs/ufs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_inode.c,v 1.13 2001/11/30 00:32:58 art Exp $ */
+/* $OpenBSD: ufs_inode.c,v 1.14 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: ufs_inode.c,v 1.7 1996/05/11 18:27:52 mycroft Exp $ */
/*
@@ -177,22 +177,22 @@ ufs_balloc_range(vp, off, len, cred, flags)
struct vm_page *pgs1[ppb], *pgs2[ppb];
UVMHIST_FUNC("ufs_balloc_range"); UVMHIST_CALLED(ubchist);
UVMHIST_LOG(ubchist, "vp %p off 0x%x len 0x%x u_size 0x%x",
- vp, off, len, vp->v_uvm.u_size);
+ vp, off, len, vp->v_size);
- oldeof = vp->v_uvm.u_size;
+ oldeof = vp->v_size;
error = VOP_SIZE(vp, oldeof, &oldeob);
if (error) {
return error;
}
- neweof = MAX(vp->v_uvm.u_size, off + len);
+ neweof = MAX(vp->v_size, off + len);
error = VOP_SIZE(vp, neweof, &neweob);
if (error) {
return error;
}
error = 0;
- uobj = &vp->v_uvm.u_obj;
+ uobj = &vp->v_uobj;
pgs1[0] = pgs2[0] = NULL;
/*
diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c
index e0777e4b55f..cb1da0934ff 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.20 2001/11/27 05:27:12 art Exp $ */
+/* $OpenBSD: ufs_readwrite.c,v 1.21 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: ufs_readwrite.c,v 1.9 1996/05/11 18:27:57 mycroft Exp $ */
/*-
@@ -120,7 +120,7 @@ READ(v)
uio->uio_resid);
if (bytelen == 0)
break;
- win = ubc_alloc(&vp->v_uvm.u_obj, uio->uio_offset,
+ win = ubc_alloc(&vp->v_uobj, uio->uio_offset,
&bytelen, UBC_READ);
error = uiomove(win, bytelen, uio);
ubc_release(win, 0);
@@ -266,6 +266,7 @@ WRITE(v)
goto bcache;
while (uio->uio_resid > 0) {
+ struct uvm_object *uobj = &vp->v_uobj;
oldoff = uio->uio_offset;
blkoffset = blkoff(fs, uio->uio_offset);
bytelen = min(fs->fs_bsize - blkoffset, uio->uio_resid);
@@ -281,8 +282,7 @@ WRITE(v)
return error;
}
- win = ubc_alloc(&vp->v_uvm.u_obj, uio->uio_offset, &bytelen,
- UBC_WRITE);
+ win = ubc_alloc(uobj, uio->uio_offset, &bytelen, UBC_WRITE);
error = uiomove(win, bytelen, uio);
ubc_release(win, 0);
@@ -292,7 +292,7 @@ WRITE(v)
*/
if (ioflag & IO_SYNC) {
- simple_lock(&vp->v_uvm.u_obj.vmobjlock);
+ simple_lock(&uobj->vmobjlock);
#if 1
/*
* XXX
@@ -303,24 +303,23 @@ WRITE(v)
* is complicated so we'll work around it for now.
*/
- rv = vp->v_uvm.u_obj.pgops->pgo_flush(
- &vp->v_uvm.u_obj,
- oldoff & ~(fs->fs_bsize - 1),
+ rv = uobj->pgops->pgo_flush(
+ uobj, oldoff & ~(fs->fs_bsize - 1),
(oldoff + bytelen + fs->fs_bsize - 1) &
~(fs->fs_bsize - 1),
PGO_CLEANIT|PGO_SYNCIO);
#else
- rv = vp->v_uvm.u_obj.pgops->pgo_flush(
- &vp->v_uvm.u_obj, oldoff, oldoff + bytelen,
+ rv = uobj->pgops->pgo_flush(
+ uobj, oldoff, oldoff + bytelen,
PGO_CLEANIT|PGO_SYNCIO);
#endif
- simple_unlock(&vp->v_uvm.u_obj.vmobjlock);
+ simple_unlock(uobj->vmobjlock);
} else if (oldoff >> 16 != uio->uio_offset >> 16) {
- simple_lock(&vp->v_uvm.u_obj.vmobjlock);
- rv = vp->v_uvm.u_obj.pgops->pgo_flush(
- &vp->v_uvm.u_obj, (oldoff >> 16) << 16,
+ simple_lock(&uobj->vmobjlock);
+ rv = uobj->pgops->pgo_flush(uobj,
+ (oldoff >> 16) << 16,
(uio->uio_offset >> 16) << 16, PGO_CLEANIT);
- simple_unlock(&vp->v_uvm.u_obj.vmobjlock);
+ simple_unlock(&uobj->vmobjlock);
}
if (error) {
break;
diff --git a/sys/uvm/uvm_bio.c b/sys/uvm/uvm_bio.c
index ba119958317..f6ce9852451 100644
--- a/sys/uvm/uvm_bio.c
+++ b/sys/uvm/uvm_bio.c
@@ -262,12 +262,12 @@ again:
UVMHIST_LOG(ubchist, "slot_offset 0x%x writeoff 0x%x writelen 0x%x "
"u_size 0x%x", slot_offset, umap->writeoff, umap->writelen,
- vp->v_uvm.u_size);
+ vp->v_size);
if (access_type & VM_PROT_WRITE &&
slot_offset >= umap->writeoff &&
(slot_offset + PAGE_SIZE <= umap->writeoff + umap->writelen ||
- slot_offset + PAGE_SIZE >= vp->v_uvm.u_size - umap->offset)) {
+ slot_offset + PAGE_SIZE >= vp->v_size - umap->offset)) {
UVMHIST_LOG(ubchist, "setting PGO_OVERWRITE", 0,0,0,0);
flags |= PGO_OVERWRITE;
}
@@ -379,7 +379,7 @@ ubc_alloc(uobj, offset, lenp, flags)
UVMHIST_FUNC("ubc_alloc"); UVMHIST_CALLED(ubchist);
UVMHIST_LOG(ubchist, "uobj %p offset 0x%lx len 0x%lx filesize 0x%x",
- uobj, offset, *lenp, ((struct uvm_vnode *)uobj)->u_size);
+ uobj, offset, *lenp, ((struct vnode *)vp)->v_size);
umap_offset = (offset & ~((voff_t)ubc_winsize - 1));
slot_offset = (vaddr_t)(offset & ((voff_t)ubc_winsize - 1));
diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c
index 05c786f6666..8ff16e98351 100644
--- a/sys/uvm/uvm_mmap.c
+++ b/sys/uvm/uvm_mmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_mmap.c,v 1.31 2001/12/04 23:22:42 art Exp $ */
+/* $OpenBSD: uvm_mmap.c,v 1.32 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: uvm_mmap.c,v 1.55 2001/08/17 05:52:46 chs Exp $ */
/*
@@ -69,7 +69,6 @@
#include <uvm/uvm.h>
#include <uvm/uvm_device.h>
-#include <uvm/uvm_vnode.h>
/*
diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c
index 67ccf7d605c..d58d0cf93f4 100644
--- a/sys/uvm/uvm_vnode.c
+++ b/sys/uvm/uvm_vnode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_vnode.c,v 1.30 2001/12/06 12:43:20 art Exp $ */
+/* $OpenBSD: uvm_vnode.c,v 1.31 2001/12/10 02:19:34 art Exp $ */
/* $NetBSD: uvm_vnode.c,v 1.51 2001/08/17 05:53:02 chs Exp $ */
/*
@@ -66,7 +66,6 @@
#include <miscfs/specfs/specdev.h>
#include <uvm/uvm.h>
-#include <uvm/uvm_vnode.h>
/*
* functions
@@ -130,7 +129,7 @@ uvn_attach(arg, accessprot)
vm_prot_t accessprot;
{
struct vnode *vp = arg;
- struct uvm_vnode *uvn = &vp->v_uvm;
+ struct uvm_object *uobj = &vp->v_uobj;
struct vattr vattr;
int result;
struct partinfo pi;
@@ -143,13 +142,13 @@ uvn_attach(arg, accessprot)
/*
* first get a lock on the uvn.
*/
- simple_lock(&uvn->u_obj.vmobjlock);
- while (uvn->u_flags & VXLOCK) {
- uvn->u_flags |= VXWANT;
+ simple_lock(uobj->vmobjlock);
+ while (vp->v_flag & VXLOCK) {
+ vp->v_flag |= VXWANT;
UVMHIST_LOG(maphist, " SLEEPING on blocked vn",0,0,0,0);
- UVM_UNLOCK_AND_WAIT(uvn, &uvn->u_obj.vmobjlock, FALSE,
+ UVM_UNLOCK_AND_WAIT(vp, &uobj->vmobjlock, FALSE,
"uvn_attach", 0);
- simple_lock(&uvn->u_obj.vmobjlock);
+ simple_lock(&uobj->vmobjlock);
UVMHIST_LOG(maphist," WOKE UP",0,0,0,0);
}
@@ -157,7 +156,7 @@ uvn_attach(arg, accessprot)
* if we're mapping a BLK device, make sure it is a disk.
*/
if (vp->v_type == VBLK && bdevsw[major(vp->v_rdev)].d_type != D_DISK) {
- simple_unlock(&uvn->u_obj.vmobjlock);
+ simple_unlock(&uobj->vmobjlock);
UVMHIST_LOG(maphist,"<- done (VBLK not D_DISK!)", 0,0,0,0);
return(NULL);
}
@@ -167,10 +166,10 @@ uvn_attach(arg, accessprot)
* set up our idea of the size
* if this hasn't been done already.
*/
- if (uvn->u_size == VSIZENOTSET) {
+ if (vp->v_size == VSIZENOTSET) {
- uvn->u_flags |= VXLOCK;
- simple_unlock(&uvn->u_obj.vmobjlock); /* drop lock in case we sleep */
+ vp->v_flag |= VXLOCK;
+ simple_unlock(&uobj->vmobjlock); /* drop lock in case we sleep */
/* XXX: curproc? */
if (vp->v_type == VBLK) {
/*
@@ -195,26 +194,26 @@ uvn_attach(arg, accessprot)
}
/* relock object */
- simple_lock(&uvn->u_obj.vmobjlock);
+ simple_lock(&uobj->vmobjlock);
- if (uvn->u_flags & VXWANT)
- wakeup(uvn);
- uvn->u_flags &= ~(VXLOCK|VXWANT);
+ if (vp->v_flag & VXWANT)
+ wakeup(vp);
+ vp->v_flag &= ~(VXLOCK|VXWANT);
if (result != 0) {
- simple_unlock(&uvn->u_obj.vmobjlock); /* drop lock */
+ simple_unlock(&uobj->vmobjlock); /* drop lock */
UVMHIST_LOG(maphist,"<- done (VOP_GETATTR FAILED!)", 0,0,0,0);
return(NULL);
}
- uvn->u_size = used_vnode_size;
+ vp->v_size = used_vnode_size;
}
/* unlock and return */
- simple_unlock(&uvn->u_obj.vmobjlock);
+ simple_unlock(&uobj->vmobjlock);
UVMHIST_LOG(maphist,"<- done, refcnt=%d", uvn->u_obj.uo_refs,
0, 0, 0);
- return (&uvn->u_obj);
+ return (uobj);
}
@@ -378,7 +377,6 @@ uvn_flush(uobj, start, stop, flags)
voff_t start, stop;
int flags;
{
- struct uvm_vnode *uvn = (struct uvm_vnode *)uobj;
struct vnode *vp = (struct vnode *)uobj;
struct vm_page *pp, *ppnext, *ptmp;
struct vm_page *pps[256], **ppsp;
@@ -405,8 +403,8 @@ uvn_flush(uobj, start, stop, flags)
}
#ifdef DIAGNOSTIC
- if (uvn->u_size == VSIZENOTSET) {
- printf("uvn_flush: size not set vp %p\n", uvn);
+ if (vp->v_size == VSIZENOTSET) {
+ printf("uvn_flush: size not set vp %p\n", vp);
vprint("uvn_flush VSIZENOTSET", vp);
flags |= PGO_ALLPAGES;
}
@@ -770,9 +768,9 @@ uvn_flush(uobj, start, stop, flags)
vp->v_bioflag |= VBIOWAIT;
UVM_UNLOCK_AND_WAIT(&vp->v_numoutput,
- &uvn->u_obj.vmobjlock,
+ &uobj->vmobjlock,
FALSE, "uvn_flush",0);
- simple_lock(&uvn->u_obj.vmobjlock);
+ simple_lock(&uobj->vmobjlock);
}
splx(s);
}
@@ -798,10 +796,10 @@ uvn_cluster(uobj, offset, loffset, hoffset)
voff_t offset;
voff_t *loffset, *hoffset; /* OUT */
{
- struct uvm_vnode *uvn = (struct uvm_vnode *)uobj;
+ struct vnode *vp = (struct vnode *)uobj;
*loffset = offset;
- *hoffset = MIN(offset + MAXBSIZE, round_page(uvn->u_size));
+ *hoffset = MIN(offset + MAXBSIZE, round_page(vp->v_size));
}
/*
@@ -995,24 +993,24 @@ uvm_vnp_setsize(vp, newsize)
struct vnode *vp;
voff_t newsize;
{
- struct uvm_vnode *uvn = &vp->v_uvm;
+ struct uvm_object *uobj = &vp->v_uobj;
voff_t pgend = round_page(newsize);
UVMHIST_FUNC("uvm_vnp_setsize"); UVMHIST_CALLED(ubchist);
- simple_lock(&uvn->u_obj.vmobjlock);
+ simple_lock(&uobj->vmobjlock);
- UVMHIST_LOG(ubchist, "old 0x%x new 0x%x", uvn->u_size, newsize, 0,0);
+ UVMHIST_LOG(ubchist, "old 0x%x new 0x%x", vp->v_size, newsize, 0,0);
/*
* now check if the size has changed: if we shrink we had better
* toss some pages...
*/
- if (uvn->u_size > pgend && uvn->u_size != VSIZENOTSET) {
- (void) uvn_flush(&uvn->u_obj, pgend, 0, PGO_FREE);
+ if (vp->v_size > pgend && vp->v_size != VSIZENOTSET) {
+ (void) uvn_flush(uobj, pgend, 0, PGO_FREE);
}
- uvn->u_size = newsize;
- simple_unlock(&uvn->u_obj.vmobjlock);
+ vp->v_size = newsize;
+ simple_unlock(&uobj->vmobjlock);
}
/*
@@ -1034,7 +1032,7 @@ uvm_vnp_zerorange(vp, off, len)
while (len) {
vsize_t bytelen = len;
- win = ubc_alloc(&vp->v_uvm.u_obj, off, &bytelen, UBC_WRITE);
+ win = ubc_alloc(&vp->v_uobj, off, &bytelen, UBC_WRITE);
memset(win, 0, bytelen);
ubc_release(win, 0);
diff --git a/sys/uvm/uvm_vnode.h b/sys/uvm/uvm_vnode.h
deleted file mode 100644
index ce853189207..00000000000
--- a/sys/uvm/uvm_vnode.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* $OpenBSD: uvm_vnode.h,v 1.9 2001/11/27 05:27:12 art Exp $ */
-/* $NetBSD: uvm_vnode.h,v 1.9 2000/03/26 20:54:48 kleink Exp $ */
-
-/*
- *
- * Copyright (c) 1997 Charles D. Cranor and Washington University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Charles D. Cranor and
- * Washington University.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * from: Id: uvm_vnode.h,v 1.1.2.4 1997/10/03 21:18:24 chuck Exp
- */
-
-#ifndef _UVM_UVM_VNODE_H_
-#define _UVM_UVM_VNODE_H_
-
-/*
- * uvm_vnode.h
- *
- * vnode handle into the VM system.
- */
-
-/*
- * the uvm_vnode structure. put at the top of the vnode data structure.
- * this allows:
- * (struct vnode *) == (struct uvm_vnode *) == (struct uvm_object *)
- */
-
-struct uvm_vnode {
- struct uvm_object u_obj; /* the actual VM object */
- int u_flags; /* flags */
- int u_nio; /* number of running I/O requests */
- voff_t u_size; /* size of object */
-};
-
-#endif /* _UVM_UVM_VNODE_H_ */