]> git.ipfire.org Git - thirdparty/linux.git/commit
xfs: add write pointer to xfs_rtgroup_geometry
authorWilfred Mallawa <wilfred.mallawa@wdc.com>
Sun, 1 Mar 2026 00:34:35 +0000 (10:34 +1000)
committerCarlos Maiolino <cem@kernel.org>
Wed, 4 Mar 2026 08:58:24 +0000 (09:58 +0100)
commitc6ce65cb17aa9321687d1b8a842487f839e1a548
tree6837855520d20dad6e275c39a5149a5524f83067
parent650b774cf94495465d6a38c31bb1a6ce697b6b37
xfs: add write pointer to xfs_rtgroup_geometry

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>
fs/xfs/libxfs/xfs_fs.h
fs/xfs/xfs_ioctl.c