diff options
author | phk <phk@FreeBSD.org> | 2003-08-15 20:03:19 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-08-15 20:03:19 +0000 |
commit | 74a38e0e006c8aa73bb296dac80468f65e90d98a (patch) | |
tree | 299d2a5d30abdc527bef4c7a0f0aa9dd1336bc74 /sys/ufs | |
parent | 448f6abd90e046b1dcff339064d860f6be7e0572 (diff) | |
download | FreeBSD-src-74a38e0e006c8aa73bb296dac80468f65e90d98a.zip FreeBSD-src-74a38e0e006c8aa73bb296dac80468f65e90d98a.tar.gz |
Eliminate the i_devvp field from the incore UFS inodes, we can
get the same value from ip->i_ump->um_devvp.
This saves a pointer in the memory copies of inodes, which can
easily run into several hundred kilobytes.
The extra indirection is unmeasurable in benchmarks.
Approved by: mckusick
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_balloc.c | 2 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 3 | ||||
-rw-r--r-- | sys/ufs/ufs/inode.h | 2 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_inode.c | 5 |
4 files changed, 5 insertions, 7 deletions
diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index 7819fbf..d4132a7 100644 --- a/sys/ufs/ffs/ffs_balloc.c +++ b/sys/ufs/ffs/ffs_balloc.c @@ -56,6 +56,8 @@ __FBSDID("$FreeBSD$"); #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> #include <ufs/ufs/ufs_extern.h> +#include <ufs/ufs/extattr.h> +#include <ufs/ufs/ufsmount.h> #include <ufs/ffs/fs.h> #include <ufs/ffs/ffs_extern.h> diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 7a41015..5aa877e 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1333,9 +1333,8 @@ ffs_vget(mp, ino, flags, vpp) return (error); } /* - * Finish inode initialization now that aliasing has been resolved. + * Finish inode initialization. */ - ip->i_devvp = ump->um_devvp; VREF(ip->i_devvp); /* * Set up a generation number for this inode if it does not diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h index 705ee3f..e23caf4f 100644 --- a/sys/ufs/ufs/inode.h +++ b/sys/ufs/ufs/inode.h @@ -65,7 +65,6 @@ struct inode { TAILQ_ENTRY(inode) i_nextsnap; /* snapshot file list. */ struct vnode *i_vnode;/* Vnode associated with this inode. */ struct ufsmount *i_ump;/* Ufsmount point associated with this inode. */ - struct vnode *i_devvp;/* Vnode for block I/O. */ u_int32_t i_flag; /* flags, see below */ struct cdev *i_dev; /* Device associated with the inode. */ ino_t i_number; /* The identity of the inode. */ @@ -127,6 +126,7 @@ struct inode { #define IN_LAZYMOD 0x0040 /* Modified, but don't write yet. */ #define IN_SPACECOUNTED 0x0080 /* Blocks to be freed in free count. */ +#define i_devvp i_ump->um_devvp #define i_dirhash i_un.dirhash #define i_snapblklist i_un.snapblklist #define i_din1 dinode_u.din1 diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c index 7327749..a644263 100644 --- a/sys/ufs/ufs/ufs_inode.c +++ b/sys/ufs/ufs/ufs_inode.c @@ -169,10 +169,7 @@ ufs_reclaim(ap) * Purge old data structures associated with the inode. */ cache_purge(vp); - if (ip->i_devvp) { - vrele(ip->i_devvp); - ip->i_devvp = 0; - } + vrele(ip->i_devvp); #ifdef QUOTA for (i = 0; i < MAXQUOTAS; i++) { if (ip->i_dquot[i] != NODQUOT) { |