Re: [PATCH 4/9] xfs: move v1 inode conversion to xfs_inode_from_disk

Dave Chinner
2016-02-08T19:44:23Z

On Mon, Feb 08, 2016 at 01:31:50AM -0800, Christoph Hellwig wrote:
> Looks fine,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Shouldn't we be able to kill off di_version as well? version 3 inodes
> only happen on crc enabled file systems, and version 2 only on
> version 4 file systems.

In theory, yes, though there is a lot of code that checks the
di_version field and the superblock version checks are more
heavyweight.

I think it's also a cleaner design to base general inode
formatting decisions on the inode version number and it's internal
flags, because then we don't have to rely on external code to
determine exactly what to do. e.g. in userspace there is no
guarantee we have a superblock context we can access, even if we
have a struct xfs_inode or a struct xfs_icdinode...

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com