Re: [PATCH 6/8] xfs_db: enable conversion of rt space units

Darrick J. Wong
2024-10-28T17:58:23Z

On Mon, Oct 28, 2024 at 01:41:38AM -0700, Christoph Hellwig wrote:
> > + [CT_AGBLOCK] = {
> > + .allowed = M(AGNUMBER)|M(BBOFF)|M(BLKOFF)|M(INOIDX)|M(INOOFF),
>
> Can you space these out with whitespaces around the operators?
>
> > + .allowed = M(AGBLOCK)|M(AGINO)|M(BBOFF)|M(BLKOFF)|M(INOIDX)|M(INOOFF),
>
> And break up the overly long lines? In fact I wonder if just having
> each M() on it's own line might be even nicer for readability.

That does look a lot better:

[CT_AGBLOCK] = {
.allowed = M(AGNUMBER) |
M(BBOFF) |
M(BLKOFF) |
M(INOIDX) |
M(INOOFF),
.names = agblock_names,
},

> > +static inline xfs_rtblock_t
> > +xfs_daddr_to_rtb(
> > + struct xfs_mount *mp,
> > + xfs_daddr_t daddr)
> > +{
> > + return daddr >> mp->m_blkbb_log;
> > +}
>
> We already have this in xfs_rtgroup.h in the latest tree, but
> I guess that comes later?

Yeah, that won't show up until we start working on 6.13, or whenever
metadir goes in.

(Also I changed my mind on naming and decided to use "xfs_" on the
db/block.h helpers that I mentioned in the previous two replies to
reduce churn downwind.)

--D

> > Set current address to SB header in allocation group
> > .IR agno .
> >
> >
> ---end quoted text---
>