Re: [PATCH 2/6] xfs: check rt summary file geometry more thoroughly

Darrick J. Wong
2023-11-28T23:30:09Z

On Tue, Nov 28, 2023 at 06:05:48AM -0800, Christoph Hellwig wrote:
> > + /*
> > + * Now that we've locked the rtbitmap and rtsummary, we can't race with
> > + * growfsrt trying to expand the summary or change the size of the rt
> > + * volume. Hence it is safe to compute and check the geometry values.
> > + */
> > + rts->rextents = xfs_rtb_to_rtx(mp, mp->m_sb.sb_rblocks);
> > + rts->rbmblocks = xfs_rtbitmap_blockcount(mp, rts->rextents);
> > + rts->rsumlevels = rts->rextents ? xfs_highbit32(rts->rextents) + 1 : 0;
> > + rsumblocks = xfs_rtsummary_blockcount(mp, rts->rsumlevels,
> > + rts->rbmblocks);
> > + rts->rsumsize = XFS_FSB_TO_B(mp, rsumblocks);
>
> Same nitpick as for the last patch.

LOL so I just tried a 64k rt volume with a 1M rextsize and mkfs crashed.
I guess I'll go sort out what's going on there...

> Otherwise looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks!

--D