Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: aalbersh@kernel.org, cem@kernel.org, wilfred.mallawa@wdc.com,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] xfs: add write pointer to xfs_rtgroup_geometry
Date: Fri, 8 May 2026 01:57:54 -0700	[thread overview]
Message-ID: <af2lkkYO_Y8CsHsP@infradead.org> (raw)
In-Reply-To: <177819182911.3486206.5193162010557711631.stgit@frogsfrogsfrogs>

Not sure if this should on it's own or with Wilfred's series to document
it and make us in xfs_io?

If the former, maybe Wilfred needs to resend on top of this series?

On Thu, May 07, 2026 at 03:12:14PM -0700, Darrick J. Wong wrote:
> From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
> 
> Source kernel commit: c6ce65cb17aa9321687d1b8a842487f839e1a548
> 
> There is currently no XFS ioctl that allows userspace to retrieve the
> write pointer for a specific realtime group block for zoned XFS. On zoned
> block devices, userspace can obtain this information via zone reports from
> the underlying device. However, for zoned XFS operating on regular block
> devices, no equivalent mechanism exists.
> 
> Access to the realtime group write pointer is useful to userspace
> development and analysis tools such as Zonar [1]. So extend the existing
> struct xfs_rtgroup_geometry to add a new rg_writepointer field. This field
> is valid if XFS_RTGROUP_GEOM_WRITEPOINTER flag is set. The rg_writepointer
> field specifies the location of the current writepointer as a block offset
> into the respective rtgroup.
> 
> [1] https://lwn.net/Articles/1059364/
> 
> Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Carlos Maiolino <cem@kernel.org>
> ---
>  libxfs/xfs_fs.h |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h
> index d165de607d179e..185f09f327c00c 100644
> --- a/libxfs/xfs_fs.h
> +++ b/libxfs/xfs_fs.h
> @@ -995,7 +995,8 @@ 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_writepointer;  /* o: write pointer block offset for zoned */
> +	__u32 rg_reserved[26];	/* o: zero */
>  };
>  #define XFS_RTGROUP_GEOM_SICK_SUPER	(1U << 0)  /* superblock */
>  #define XFS_RTGROUP_GEOM_SICK_BITMAP	(1U << 1)  /* rtbitmap */
> @@ -1003,6 +1004,8 @@ struct xfs_rtgroup_geometry {
>  #define XFS_RTGROUP_GEOM_SICK_RMAPBT	(1U << 3)  /* reverse mappings */
>  #define XFS_RTGROUP_GEOM_SICK_REFCNTBT	(1U << 4)  /* reference counts */
>  
> +#define XFS_RTGROUP_GEOM_WRITEPOINTER  (1U << 0)  /* write pointer */
> +
>  /* Health monitor event domains */
>  
>  /* affects the whole fs */
> 
> 
---end quoted text---

  reply	other threads:[~2026-05-08  8:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 22:11 [PATCHSET 2/2] xfsprogs: new libxfs code from kernel 7.1 Darrick J. Wong
2026-05-07 22:12 ` [PATCH 1/2] xfs: add write pointer to xfs_rtgroup_geometry Darrick J. Wong
2026-05-08  8:57   ` Christoph Hellwig [this message]
2026-05-07 22:12 ` [PATCH 2/2] xfs: switch (back) to a per-buftarg buffer hash Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af2lkkYO_Y8CsHsP@infradead.org \
    --to=hch@infradead.org \
    --cc=aalbersh@kernel.org \
    --cc=cem@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=wilfred.mallawa@wdc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox