improve zoned XFS GC buffer management

Christoph Hellwig
2025-12-18T06:32:39Z

Hi all,

the zoned XFS GC code currently uses a weird bank switching strategy to
manage the scratch buffer. The reason for that was that I/O could be
proceed out of order in the early days, but that actually changed before
the code was upstreamed to avoid fragmentation. This replaced the logic
with a simple ring buffer, which makes the buffer space utilization much
more efficient.

Before that, two patches makes the reuse of the bios a lot less fragile,
and for that we need a new block layer helper that should eventually also
be useful in other places. Jens, let me know if merging this through the
XFS tree is ok.

Diffstat:
block/bio.c | 25 +++++++++++
fs/xfs/xfs_zone_gc.c | 113 +++++++++++++++++++++++++++------------------------
include/linux/bio.h | 1
3 files changed, 86 insertions(+), 53 deletions(-)