On Wed, Oct 11, 2023 at 11:07:32AM -0700, Darrick J. Wong wrote: > +/* > + * Compute the number of rtbitmap blocks needed to track the given number of rt > + * extents. > + */ > +xfs_filblks_t > +xfs_rtbitmap_blockcount( > + struct xfs_mount *mp, > + xfs_rtbxlen_t rtextents) > +{ > + return howmany_64(rtextents, NBBY * mp->m_sb.sb_blocksize); > +} Given that this only has a few users, the !RT stub is a pain, and having a different result from before in the transaction reservation is somewhat unexpected change (even if harmless), maybe just mark this inline? > +/* > + * Compute the number of rtbitmap words needed to populate every block of a > + * bitmap that is large enough to track the given number of rt extents. > + */ > +unsigned long long > +xfs_rtbitmap_wordcount( > + struct xfs_mount *mp, > + xfs_rtbxlen_t rtextents) > +{ > + xfs_filblks_t blocks; > + > + blocks = xfs_rtbitmap_blockcount(mp, rtextents); > + return XFS_FSB_TO_B(mp, blocks) >> XFS_WORDLOG; > +} This one isn't used in this patch or the rest of the series. Maybe move it to the patch (-series) that adds the caller in the repair code?