Re: [RFC] Slimming down struct inode

Theodore Tso
2006-06-15T06:41:27Z

On Thu, Jun 15, 2006 at 07:50:19AM +1000, Nathan Scott wrote:
> As to whether a new inode operation is useful/needed - *shrug* - not
> really my call, I was saying we can work with whatever ends up being
> the final solution, provided it keeps per-inode granularity.

XFS should be return a per-inode value for st_blksize by simply setting
kstat->st_blksize in linvfs_getattr() found in fs/xfs/linux-2.6/xfs_iops.c.

In the inode diet patches that I'm working on, I've just deleted the
calls to set i_blksize in the XFS code, which will cause st_blksize to
default to PAGE_CACHE_SIZE (unless the filesystem overrides the value
found in sb->s_blksize). I tried to figure out mind-twisting
conversion of the multiple data structures hanging off of each other
in the Irix/Linux compatibility layer (yuck, I still can't believe
this got into mainline), but since I didn't have the stomach for it,
I'll let the XFS maintainers decide how put in per-inode st_blksize
values --- but it is definitely doable.

Regards,

- Ted