diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-26 03:56:31 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-26 03:56:31 +0000 |
commit | e42537dd9b49300502037dfb5cdf355a321448e3 (patch) | |
tree | 9b71f4c6b97ffbf79b5cd003d5f3252ee3ea98f0 /sys/ufs/ffs | |
parent | 0eb63e7e73c6efbce4108d08819b30e6a6b3915c (diff) |
compat with uvm vnode pager
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 6 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_balloc.c | 10 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_inode.c | 23 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 6 |
4 files changed, 41 insertions, 4 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 419480815f6..0a25f83312b 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.14 1999/01/11 05:12:37 millert Exp $ */ +/* $OpenBSD: ffs_alloc.c,v 1.15 1999/02/26 03:56:30 art Exp $ */ /* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */ /* @@ -276,7 +276,11 @@ 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 3a062bcda05..d0c449573c0 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.7 1999/01/11 05:12:37 millert Exp $ */ +/* $OpenBSD: ffs_balloc.c,v 1.8 1999/02/26 03:56:30 art Exp $ */ /* $NetBSD: ffs_balloc.c,v 1.3 1996/02/09 22:22:21 christos Exp $ */ /* @@ -46,6 +46,10 @@ #include <vm/vm.h> +#if defined(UVM) +#include <uvm/uvm_extern.h> +#endif + #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> #include <ufs/ufs/ufs_extern.h> @@ -118,7 +122,11 @@ ffs_balloc(v) fs->fs_bsize, osize, bp); ip->i_ffs_size = (nb + 1) * fs->fs_bsize; +#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 77a56005ad8..55191fb3ea0 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.11 1998/12/01 23:32:52 art Exp $ */ +/* $OpenBSD: ffs_inode.c,v 1.12 1999/02/26 03:56:30 art Exp $ */ /* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */ /* @@ -50,6 +50,10 @@ #include <vm/vm.h> +#if defined(UVM) +#include <uvm/uvm_extern.h> +#endif + #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> #include <ufs/ufs/ufsmount.h> @@ -208,7 +212,11 @@ ffs_truncate(v) 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 ovp->v_lasta = ovp->v_clen = ovp->v_cstart = ovp->v_lastw = 0; if (DOINGSOFTDEP(ovp)) { if (length > 0) { @@ -255,8 +263,13 @@ ffs_truncate(v) 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 @@ -264,7 +277,11 @@ ffs_truncate(v) oip->i_flag |= IN_CHANGE | IN_UPDATE; return (VOP_UPDATE(ovp, &ts, &ts, 1)); } +#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 @@ -287,7 +304,11 @@ ffs_truncate(v) 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 bzero((char *)bp->b_data + offset, (u_int)(size - offset)); allocbuf(bp, size); if (aflags & B_SYNC) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 52f027086fb..b987c318c7a 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.8 1998/11/12 04:30:02 csapuntz Exp $ */ +/* $OpenBSD: ffs_vnops.c,v 1.9 1999/02/26 03:56:30 art Exp $ */ /* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */ /* @@ -52,6 +52,10 @@ #include <vm/vm.h> +#if defined(UVM) +#include <uvm/uvm_extern.h> +#endif + #include <miscfs/specfs/specdev.h> #include <miscfs/fifofs/fifo.h> |