diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-06-03 19:49:39 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-06-03 19:49:39 +0000 |
commit | b81979bcb032d5cc3a0679d5751e5013b5e3606d (patch) | |
tree | 1dd8d89829797de220406f25aa114a6dc62e563c /sys/xfs | |
parent | f8ffd3087000a03a6e2574e9dbd43d4cbe69bb2a (diff) |
use uvm_vnp_setsize when uvm (workaround)
Diffstat (limited to 'sys/xfs')
-rw-r--r-- | sys/xfs/xfs_message.c | 10 | ||||
-rw-r--r-- | sys/xfs/xfs_vnodeops-common.c | 6 |
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/xfs/xfs_message.c b/sys/xfs/xfs_message.c index beb951376b3..2c6bcb43a4b 100644 --- a/sys/xfs/xfs_message.c +++ b/sys/xfs/xfs_message.c @@ -45,7 +45,7 @@ #include <xfs/xfs_vfsops.h> #include <xfs/xfs_vnodeops.h> -RCSID("$Id: xfs_message.c,v 1.4 1999/04/30 01:59:00 art Exp $"); +RCSID("$Id: xfs_message.c,v 1.5 1999/06/03 19:49:38 art Exp $"); int xfs_message_installroot(int fd, @@ -119,9 +119,13 @@ xfs_message_installattr(int fd, if (t != 0) { t->tokens = message->node.tokens; xfs_attr2vattr(&message->node.attr, &t->attr); +#ifdef UVM + uvm_vnp_setsize(XNODE_TO_VNODE(t), t->attr.va_size); +#else #ifdef HAVE_KERNEL_VNODE_PAGER_SETSIZE vnode_pager_setsize(XNODE_TO_VNODE(t), t->attr.va_size); #endif +#endif bcopy(message->node.id, t->id, sizeof(t->id)); bcopy(message->node.rights, t->rights, sizeof(t->rights)); t->anonrights = message->node.anonrights; @@ -194,9 +198,13 @@ xfs_message_installdata(int fd, t->tokens = message->node.tokens; xfs_attr2vattr(&message->node.attr, &t->attr); +#ifdef UVM + uvm_vnp_setsize(XNODE_TO_VNODE(t), t->attr.va_size); +#else #ifdef HAVE_KERNEL_VNODE_PAGER_SETSIZE vnode_pager_setsize(XNODE_TO_VNODE(t), t->attr.va_size); #endif +#endif if (XNODE_TO_VNODE(t)->v_type == VDIR && (message->flag & XFS_INVALID_DNLC)) cache_purge (XNODE_TO_VNODE(t)); diff --git a/sys/xfs/xfs_vnodeops-common.c b/sys/xfs/xfs_vnodeops-common.c index fee9b17acc8..584785cd2dd 100644 --- a/sys/xfs/xfs_vnodeops-common.c +++ b/sys/xfs/xfs_vnodeops-common.c @@ -49,7 +49,7 @@ #include <xfs/xfs_syscalls.h> #include <xfs/xfs_vnodeops.h> -RCSID("$Id: xfs_vnodeops-common.c,v 1.1 1999/04/30 01:59:01 art Exp $"); +RCSID("$Id: xfs_vnodeops-common.c,v 1.2 1999/06/03 19:49:37 art Exp $"); int xfs_open_valid(struct vnode * vp, struct ucred * cred, u_int tok) @@ -294,9 +294,13 @@ xfs_write_common(struct vnode *vp, struct uio *uiop, int ioflag, struct ucred *c if (error2 == 0) { xn->attr.va_size = sub_attr.va_size; xn->attr.va_mtime = sub_attr.va_mtime; +#ifdef UVM + uvm_vnp_setsize(vp, sub_attr.va_size); +#else #ifdef HAVE_KERNEL_VNODE_PAGER_SETSIZE vnode_pager_setsize(vp, sub_attr.va_size); #endif +#endif } xfs_vfs_unlock(t, xfs_uio_to_proc(uiop)); } |