Re: [RFC] [PATCH 5/8] inode-diet: Eliminate i_blksize and use a per-superblock default

Avi Kivity
2006-06-19T15:49:26Z

Theodore Tso wrote:
>
> This eliminates the i_blksize field from struct inode and uses default
> value in super->s_blksize. Filesystems that want to provide a
> per-inode st_blksize can do so by providing their own getattr routine
> instead of using the generic_fillattr() function.
>

> Index: linux-2.6.17/include/linux/nfsd/nfsfh.h
> ===================================================================
> --- linux-2.6.17.orig/include/linux/nfsd/nfsfh.h 2006-06-18
> 19:37:14.000000000 -0400
> +++ linux-2.6.17/include/linux/nfsd/nfsfh.h 2006-06-18
> 19:53:54.000000000 -0400
> @@ -270,8 +270,8 @@
> fhp->fh_post_uid = inode->i_uid;
> fhp->fh_post_gid = inode->i_gid;
> fhp->fh_post_size = inode->i_size;
> - if (inode->i_blksize) {
> - fhp->fh_post_blksize = inode->i_blksize;
> + if (inode->i_sb->s_blksize) {
> + fhp->fh_post_blksize = inode->i_sb->s_blksize;
> fhp->fh_post_blocks = inode->i_blocks;
> } else {
> fhp->fh_post_blksize = BLOCK_SIZE;
>

Isn't this a behavioral change? If a filesystem chooses to provide
i_blksize via a getattr method, it will not show on nfs mounts.

--
error compiling committee.c: too many arguments to function