diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-03-31 12:45:02 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-03-31 12:45:02 +0000 |
commit | d23b5f336dc3c989ba37bf525b95ff0ab7634b63 (patch) | |
tree | 48a6f77a6680f9f1ee4305853e2a5b173d501400 /sys/ufs/ffs | |
parent | a5666c63a674f283c50afcd24d4ecd62ac8ccb5d (diff) |
Teach ffs_vget() to allocate and associate FFS2 dinodes
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 17b071d5a8a..c2821ac0a5a 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vfsops.c,v 1.84 2006/03/31 12:19:42 pedro Exp $ */ +/* $OpenBSD: ffs_vfsops.c,v 1.85 2006/03/31 12:45:01 pedro Exp $ */ /* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */ /* @@ -1181,6 +1181,9 @@ ffs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) register struct fs *fs; register struct inode *ip; struct ufs1_dinode *dp1; +#ifdef FFS2 + struct ufs2_dinode *dp2; +#endif struct ufsmount *ump; struct buf *bp; struct vnode *vp; @@ -1252,9 +1255,18 @@ retry: return (error); } - ip->i_din1 = pool_get(&ffs_dinode1_pool, PR_WAITOK); - dp1 = (struct ufs1_dinode *) bp->b_data + ino_to_fsbo(fs, ino); - *ip->i_din1 = *dp1; +#ifdef FFS2 + if (ip->i_ump->um_fstype == UM_UFS2) { + ip->i_din2 = pool_get(&ffs_dinode2_pool, PR_WAITOK); + dp2 = (struct ufs2_dinode *) bp->b_data + ino_to_fsbo(fs, ino); + *ip->i_din2 = *dp2; + } else +#endif + { + ip->i_din1 = pool_get(&ffs_dinode1_pool, PR_WAITOK); + dp1 = (struct ufs1_dinode *) bp->b_data + ino_to_fsbo(fs, ino); + *ip->i_din1 = *dp1; + } brelse(bp); |