/* Calculate the default attribute fork offset for newly created inodes.  */
uint xfs_default_attroffset(struct xfs_inode *ip)
/* Calculate the default attribute fork offset for newly created inodes.  */
uint xfs_default_attroffset(struct xfs_inode *ip)
{
	struct xfs_mount	*mp = ip->i_mount;
	uint			offset;
	if (mp->m_sb.sb_inodesize == 256) {
		offset = XFS_LITINO(mp) -
				XFS_BMDR_SPACE_CALC(MINABTPTRS);
	} else {
		offset = XFS_BMDR_SPACE_CALC(6 * MINABTPTRS);
	}
	ASSERT(offset < XFS_LITINO(mp));
	return offset;
}