Re: [PATCH] xfs: add write pointer to xfs_rtgroup_geometry

From: hch

Date: Fri Feb 27 2026 - 08:52:54 EST


On Fri, Feb 27, 2026 at 05:16:39AM +0000, Wilfred Mallawa wrote:
> > > - __u32 rg_reserved[27]; /* o: zero */
> > > + __u32 rg_reserved0; /* o: preserve alignment */
> > > + __u64 rg_writepointer;  /* o: write pointer sector for
> > > zoned */
> >
> > Hrm.  It's not possible to advance the write pointer less than a
> > single
> > xfs fsblock, right? 
>
> I believe so, perhaps Christoph could chime in?

It's not possible.

>
> > zoned rt requires rt groups, so that means the
> > write pointer within a rtgroup has to be a xfs_rgblock_t (32bit)
> > value,
> > so shouldn't this be a __u32 field?
>
> I figured since this is currently returning a basic block offset
> (similar to a zone report from a zoned device), it *could* exceed a
> U32_MAX for larger zones (?). Does it seem more appropriate to return
> the xfs fsblock offset here instead?

No, the count of blocks in a zone is a xfs_rgblock_t, which is a
uint32_t. So all group/zone relative addressing can and should use
32-bit types.