Re: [PATCH 35/50] xfs_db: report rt group and block number in the bmap command

Darrick J. Wong
2024-12-11T21:48:34Z

On Mon, Dec 09, 2024 at 09:49:27PM -0800, Christoph Hellwig wrote:
> On Fri, Dec 06, 2024 at 04:14:05PM -0800, Darrick J. Wong wrote:
> > +static void
> > +print_group_bmbt(
> > + bool isrt,
> > + int whichfork,
> > + const struct bmap_ext *be)
> > +{
> > + unsigned int gno;
> > + unsigned long long gbno;
> > +
> > + if (whichfork == XFS_DATA_FORK && isrt) {
> > + gno = xfs_rtb_to_rgno(mp, be->startblock);
> > + gbno = xfs_rtb_to_rgbno(mp, be->startblock);
> > + } else {
> > + gno = XFS_FSB_TO_AGNO(mp, be->startblock);
> > + gbno = XFS_FSB_TO_AGBNO(mp, be->startblock);
>
> Maybe use xfs_fsb_to_gno and xfs_fsb_to_gbno here?

Will do.

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

Thanks!

--D