xfs: take inode version into account in XFS_LITINO

Add a version argument to XFS_LITINO so that it can return different values
depending on the inode version.  This is required for the upcoming v3 inodes
with a larger fixed layout dinode.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
This commit is contained in:
Christoph Hellwig
2013-03-12 23:30:36 +11:00
committed by Ben Myers
parent c163f9a176
commit 56cea2d088
5 changed files with 13 additions and 10 deletions

View File

@@ -228,13 +228,13 @@ xfs_default_attroffset(
uint offset;
if (mp->m_sb.sb_inodesize == 256) {
offset = XFS_LITINO(mp) -
offset = XFS_LITINO(mp, ip->i_d.di_version) -
XFS_BMDR_SPACE_CALC(MINABTPTRS);
} else {
offset = XFS_BMDR_SPACE_CALC(6 * MINABTPTRS);
}
ASSERT(offset < XFS_LITINO(mp));
ASSERT(offset < XFS_LITINO(mp, ip->i_d.di_version));
return offset;
}