Re: [PATCH 02/16] xfs: factor out a generic xfs_group structure

Darrick J. Wong
2024-10-15T01:05:54Z

On Tue, Oct 15, 2024 at 11:52:10AM +1100, Dave Chinner wrote:
> On Thu, Oct 10, 2024 at 05:44:42PM -0700, Darrick J. Wong wrote:
> > @@ -232,9 +276,9 @@ xfs_perag_next(
> > xfs_agnumber_t *agno,
> > xfs_agnumber_t end_agno)
> > {
> > - struct xfs_mount *mp = pag->pag_mount;
> > + struct xfs_mount *mp = pag_mount(pag);
> >
> > - *agno = pag->pag_agno + 1;
> > + *agno = pag->pag_group.xg_index + 1;
>
> pag_agno(pag) + 1?
>
> > xfs_perag_rele(pag);
> > while (*agno <= end_agno) {
> > pag = xfs_perag_grab(mp, *agno);
> > @@ -265,9 +309,9 @@ xfs_perag_next_wrap(
> > xfs_agnumber_t restart_agno,
> > xfs_agnumber_t wrap_agno)
> > {
> > - struct xfs_mount *mp = pag->pag_mount;
> > + struct xfs_mount *mp = pag_mount(pag);
> >
> > - *agno = pag->pag_agno + 1;
> > + *agno = pag->pag_group.xg_index + 1;
>
> Same.

Done.

--D

> -Dave.
> --
> Dave Chinner
> david@fromorbit.com
>