mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-28 16:43:09 +00:00
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
This commit is contained in:
parent
fc35a81b09
commit
5c24d6ee26
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118969
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user