summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2005-12-17 13:56:03 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2005-12-17 13:56:03 +0000
commite38aaba8f021e6def58a61effa27cb8f5d2016d9 (patch)
tree78491aa5b6f11214545647b5b29de21ef9789e13 /usr.sbin
parent0d772ba1a2978d65a104b1e7715edea2ea7f6d2b (diff)
Remove the 'on disk' inode (dinode) from the 'in memory' inode in UFS.
Instead of having the dinode inside the inode structure itself, we now have just a pointer to it, and use a separate pool to allocate dinodes as needed. Inspiration from FreeBSD, various testing for a while, thanks.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pstat/pstat.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 36554b44dcc..8398c917138 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pstat.c,v 1.54 2005/12/11 20:46:29 pedro Exp $ */
+/* $OpenBSD: pstat.c,v 1.55 2005/12/17 13:56:02 pedro Exp $ */
/* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */
/*-
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
from: static char sccsid[] = "@(#)pstat.c 8.9 (Berkeley) 2/16/94";
#else
-static char *rcsid = "$OpenBSD: pstat.c,v 1.54 2005/12/11 20:46:29 pedro Exp $";
+static char *rcsid = "$OpenBSD: pstat.c,v 1.55 2005/12/17 13:56:02 pedro Exp $";
#endif
#endif /* not lint */
@@ -356,11 +356,16 @@ ufs_print(struct vnode *vp)
{
int flag;
struct inode inode, *ip = &inode;
+ struct ufs1_dinode di1;
char flagbuf[16], *flags = flagbuf;
char *name;
mode_t type;
KGETRET(VTOI(vp), &inode, sizeof(struct inode), "vnode's inode");
+ KGETRET(inode.i_din1, &di1, sizeof(struct ufs1_dinode),
+ "vnode's dinode");
+
+ inode.i_din1 = &di1;
flag = ip->i_flag;
#if 0
if (flag & IN_LOCKED)