]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: reduce special casing for the open GC zone
authorChristoph Hellwig <hch@lst.de>
Tue, 31 Mar 2026 15:27:29 +0000 (17:27 +0200)
committerCarlos Maiolino <cem@kernel.org>
Tue, 7 Apr 2026 11:28:47 +0000 (13:28 +0200)
commit1d0d9e9459c053fc1700739e267271adccdcaadc
treed086cd67eb048da7587041f1e12d72ed4e7adcc9
parent4c1b6e03e31c5933355f25fe7fa564be3a0f931d
xfs: reduce special casing for the open GC zone

Currently the open zone used for garbage collection is a special snow
flake, and it has been a bit annoying for some further zoned XFS work
I've been doing.

Remove the zi_open_gc_field and instead track the open GC zone in the
zi_open_zones list together with the normal open zones, and keep an extra
pointer and a reference of in the GC thread's data structure.  This means
anything iterating over open zones just has to look at zi_open_zones, and
the life time rules are consistent.  It also helps to add support for
multiple open GC zones if we ever need them, and removes a bit of code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
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_zone_alloc.c
fs/xfs/xfs_zone_gc.c
fs/xfs/xfs_zone_info.c
fs/xfs/xfs_zone_priv.h