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

From: Wilfred Mallawa

Date: Fri Feb 27 2026 - 00:17:24 EST


[snip]
> > [1] https://lwn.net/Articles/1059364/
> > Signed-off-by: Wilfred Mallawa <wilfred.mallawa@xxxxxxx>
> > ---
> >  fs/xfs/libxfs/xfs_fs.h |  6 +++++-
> >  fs/xfs/xfs_ioctl.c     | 20 ++++++++++++++++++++
> >  2 files changed, 25 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h
> > index d165de607d17..ca63ae67f16c 100644
> > --- a/fs/xfs/libxfs/xfs_fs.h
> > +++ b/fs/xfs/libxfs/xfs_fs.h
> > @@ -995,7 +995,9 @@ struct xfs_rtgroup_geometry {
> >   __u32 rg_sick; /* o: sick things in ag */
> >   __u32 rg_checked; /* o: checked metadata in ag */
> >   __u32 rg_flags; /* i/o: flags for this ag
> > */
> > - __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?

> 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?

Wilfred
>