Reduce size of ufs inode.
authorkib <kib@FreeBSD.org>
Sat, 17 Sep 2016 16:47:34 +0000 (16:47 +0000)
committerkib <kib@FreeBSD.org>
Sat, 17 Sep 2016 16:47:34 +0000 (16:47 +0000)
commit20f1e8ac63b58708989267ea34a6aefa90b46577
tree9d248bae3371c8466d0d7b66280e2536a1d1c715
parent6f4715ee269843da4ad733bb6ca86c54a3822fd3
Reduce size of ufs inode.

Remove redunand i_dev and i_fs pointers, which are available as
ip->i_ump->um_dev and ip->i_ump->um_fs, and reorder members by size to
reduce padding.  To compensate added derefences, the most often i_ump
access to differentiate between UFS1 and UFS2 dinode layout is
removed, by addition of the new i_flag IN_UFS2.  Overall, this
actually reduces the amount of memory dereferences.

On 64bit machine, original struct inode size is 176, reduced to 152
bytes with the change.

Tested by: pho (previous version)
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
17 files changed:
sys/ufs/ffs/ffs_alloc.c
sys/ufs/ffs/ffs_balloc.c
sys/ufs/ffs/ffs_inode.c
sys/ufs/ffs/ffs_rawread.c
sys/ufs/ffs/ffs_snapshot.c
sys/ufs/ffs/ffs_softdep.c
sys/ufs/ffs/ffs_subr.c
sys/ufs/ffs/ffs_vfsops.c
sys/ufs/ffs/ffs_vnops.c
sys/ufs/ufs/inode.h
sys/ufs/ufs/ufs_acl.c
sys/ufs/ufs/ufs_bmap.c
sys/ufs/ufs/ufs_gjournal.c
sys/ufs/ufs/ufs_inode.c
sys/ufs/ufs/ufs_quota.c
sys/ufs/ufs/ufs_vnops.c
sys/ufs/ufs/ufsmount.h