On Fri, Apr 02, 2021 at 08:10:59AM +0100, Christoph Hellwig wrote: > On Tue, Mar 30, 2021 at 04:30:59PM +1100, Dave Chinner wrote: > > +unsigned int > > +xfs_bmap_compute_attr_offset( > > + struct xfs_mount *mp) > > +{ > > + if (mp->m_sb.sb_inodesize == 256) > > + return XFS_LITINO(mp) - XFS_BMDR_SPACE_CALC(MINABTPTRS); > > + return XFS_BMDR_SPACE_CALC(6 * MINABTPTRS); > > +} > > There isn't really anything bmap about this function. Maybe just merge > it into xfs_mount_setup_inode_geom? Sure there is - the XFS_BMDR_SPACE_CALC is a specific bmap btree root size calculation defined in xfs_bmap_btree.h. I left it here because I don't want to include xfs_bmap_btree.h into fs/xfs/xfs_mount.h. There is no reason for xfs_mount.c to know anything about the internals of bmap btrees, similar to how we call xfs_bmap_compute_maxlevels() to calculate the static characteristics of the bmap btrees... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx