]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: split and refactor zone validation
authorChristoph Hellwig <hch@lst.de>
Wed, 14 Jan 2026 06:53:27 +0000 (07:53 +0100)
committerCarlos Maiolino <cem@kernel.org>
Wed, 21 Jan 2026 11:57:17 +0000 (12:57 +0100)
commit19c5b6051ed62d8c4b1cf92e463c1bcf629107f4
tree96ffa0705db777773431dc9695cc07ea4639aa22
parent776b76f7547fb839954aae06f58ac7b6b35c0b25
xfs: split and refactor zone validation

Currently xfs_zone_validate mixes validating the software zone state in
the XFS realtime group with validating the hardware state reported in
struct blk_zone and deriving the write pointer from that.

Move all code that works on the realtime group to xfs_init_zone, and only
keep the hardware state validation in xfs_zone_validate.  This makes the
code more clear, and allows for better reuse in userspace.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/libxfs/xfs_zones.c
fs/xfs/libxfs/xfs_zones.h
fs/xfs/xfs_zone_alloc.c