Re: [PATCH 42/50] xfs_io: display rt group in verbose fsmap output

Christoph Hellwig
2024-12-10T06:00:16Z

> + } else if (p->fmr_device == xfs_rt_dev && fsgeo->rgcount > 0) {
> + agno = p->fmr_physical / bperrtg;
> + agoff = p->fmr_physical - (agno * bperrtg);

This second calculation seems awfully complicated vs the simple:

agoff = p->fmr_physical % bperrtg;

Any reason for that except for copy and pasting the AG version?

> + } else if (p->fmr_device == xfs_rt_dev && fsgeo->rgcount > 0) {
> + agno = p->fmr_physical / bperrtg;
> + agoff = p->fmr_physical - (agno * bperrtg);

Also a little annoying that all this is duplicated, but that also seems
to be based off the AG version.

So while this could all look a little nicer, the changes themselves
looks good:

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