]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: fix number of GC bvecs
authorChristoph Hellwig <hch@lst.de>
Tue, 7 Apr 2026 14:05:24 +0000 (16:05 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 7 Apr 2026 14:22:24 +0000 (08:22 -0600)
commit452c8f6cbd0ef1408474a875c5c4149a02c7610f
tree40cfc2a384e01a16f6a3caaed7de4335933fe5b5
parentaffb5f67d73c1e0bd412e7807a55691502b5679e
xfs: fix number of GC bvecs

GC scratch allocations can wrap around and use the same buffer twice, and
the current code fails to account for that.  So far this worked due to
rounding in the block layer, but changes to the bio allocator drop the
over-provisioning and generic/256 or generic/361 will now usually fail
when running against the current block tree.

Simplify the allocation to always pass the maximum value that is easier to
verify, as a saving of up to one bvec per allocation isn't worth the
effort to verify a complicated calculated value.

Fixes: 102f444b57b3 ("xfs: rework zone GC buffer management")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Link: https://patch.msgid.link/20260407140538.633364-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/xfs/xfs_zone_gc.c