]> Gentwo Git Trees - linux/.git/commit
xfs: remove xfs_last_used_zone
authorChristoph Hellwig <hch@lst.de>
Mon, 18 Aug 2025 05:06:43 +0000 (07:06 +0200)
committerCarlos Maiolino <cem@kernel.org>
Tue, 19 Aug 2025 12:37:07 +0000 (14:37 +0200)
commitd004d70d6cdf03928da0d05c8c15c2ccc15657cd
tree88c726add4d170d5adf40fd9fc272386a331403d
parent9ce43caa4b7be707638d49ad4fb358b6ff646e91
xfs: remove xfs_last_used_zone

This was my first attempt at caching the last used zone.  But it turns out
for O_DIRECT or RWF_DONTCACHE that operate concurrently or in very short
sequence, the bmap btree does not record a written extent yet, so it fails.
Because it then still finds the last written zone it can lead to a weird
ping-pong around a few zones with writers seeing different values.

Remove it entirely as the later added xfs_cached_zone actually does a
much better job enforcing the locality as the zone is associated with the
inode in the MRU cache as soon as the zone is selected.

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