]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: handle too many open zones when mounting
authorChristoph Hellwig <hch@lst.de>
Tue, 31 Mar 2026 15:26:06 +0000 (17:26 +0200)
committerCarlos Maiolino <cem@kernel.org>
Tue, 7 Apr 2026 11:16:59 +0000 (13:16 +0200)
commitc6584888864e36d6225a6c16d8c39fd2aa9a45d8
tree7ad4b4c750650ec637576112f3d8a41278d9382c
parent02367990bdcbeabb0ffd3e8e227e5f79a04186fc
xfs: handle too many open zones when mounting

When running on conventional zones or devices, the zoned allocator does
not have a real write pointer, but instead fakes it up at mount time
based on the last block recorded in the rmap.  This can create spurious
"open" zones when the last written blocks in a conventional zone are
invalidated.  Add a loop to the mount code to find the conventional zone
with the highest used block in the rmap tree and "finish" it until we
are below the open zones limit.

While we're at it, also error out if there are too many open sequential
zones, which can only happen when the user overrode the max open zones
limit (or with really buggy hardware reducing the limit, but not much
we can do about that).

Fixes: 4e4d52075577 ("xfs: add the zoned space allocator")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_trace.h
fs/xfs/xfs_zone_alloc.c