Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs initialize the vnode's copy of the size in lfs_i...
details: https://anonhg.NetBSD.org/src/rev/ff6cfc1d3219
branches: trunk
changeset: 516052:ff6cfc1d3219
user: chs <chs%NetBSD.org@localhost>
date: Sun Oct 14 19:06:16 2001 +0000
description:
initialize the vnode's copy of the size in lfs_ialloc().
diffstat:
sys/ufs/lfs/lfs_alloc.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (49 lines):
diff -r c83733fcb1b9 -r ff6cfc1d3219 sys/ufs/lfs/lfs_alloc.c
--- a/sys/ufs/lfs/lfs_alloc.c Sun Oct 14 19:03:43 2001 +0000
+++ b/sys/ufs/lfs/lfs_alloc.c Sun Oct 14 19:06:16 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_alloc.c,v 1.50 2001/09/28 11:59:55 chs Exp $ */
+/* $NetBSD: lfs_alloc.c,v 1.51 2001/10/14 19:06:16 chs Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -378,17 +378,17 @@
lockmgr(&ufs_hashlock, LK_EXCLUSIVE, 0);
/* Create an inode to associate with the vnode. */
lfs_vcreate(pvp->v_mount, new_ino, vp);
-
+
ip = VTOI(vp);
LFS_SET_UINO(ip, IN_CHANGE | IN_MODIFIED);
/* Zero out the direct and indirect block addresses. */
bzero(&ip->i_din, sizeof(ip->i_din));
ip->i_din.ffs_din.di_inumber = new_ino;
-
+
/* Set a new generation number for this inode. */
if (new_gen)
ip->i_ffs_gen = new_gen;
-
+
/* Insert into the inode hash table. */
ufs_ihashins(ip);
lockmgr(&ufs_hashlock, LK_RELEASE, 0);
@@ -396,7 +396,8 @@
ufs_vinit(vp->v_mount, lfs_specop_p, lfs_fifoop_p, &vp);
ip = VTOI(vp);
/* printf("lfs_ialloc[2]: ino %d vp %p\n", new_ino, vp);*/
-
+
+ uvm_vnp_setsize(vp, 0);
*vpp = vp;
#if 1
if(!(vp->v_flag & VDIROP)) {
@@ -404,7 +405,7 @@
++lfs_dirvcount;
}
vp->v_flag |= VDIROP;
-
+
if(!(ip->i_flag & IN_ADIROP))
++fs->lfs_nadirop;
ip->i_flag |= IN_ADIROP;
Home |
Main Index |
Thread Index |
Old Index