]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
mkfs: adjust_nr_zones for zoned file system on conventional devices
authorChristoph Hellwig <hch@lst.de>
Thu, 18 Dec 2025 16:09:32 +0000 (17:09 +0100)
committerAndrey Albershteyn <aalbersh@kernel.org>
Fri, 19 Dec 2025 14:01:29 +0000 (15:01 +0100)
commitb5d372d96db1adb316c91a058dddffb38ef6d166
tree770f330dcaf36502e3c9289b767abe1f87fef693
parent20796eec31f8afe388bf8d8ae9064f29c5af07a1
mkfs: adjust_nr_zones for zoned file system on conventional devices

When creating zoned file systems on conventional devices, mkfs doesn't
currently align the RT device size to the zone size, which can create
unmountable file systems.  Fix this by moving the rgcount modification
to account for reserved zoned and then calling adjust_nr_zones
unconditionally, and thus ensuring that the rtblocks and rtextents values
are guaranteed to always be a multiple of the zone size.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
mkfs/xfs_mkfs.c