]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: factor xfs_alloc_vextent_this_ag() for _iterate_ags()
authorDave Chinner <dchinner@redhat.com>
Tue, 9 May 2023 09:29:52 +0000 (11:29 +0200)
committerCarlos Maiolino <cem@kernel.org>
Wed, 10 May 2023 11:47:57 +0000 (13:47 +0200)
commit649442d074a95ba076936c7e60de645ebda656af
tree1363e445d4cf9938ccfff52cf21252d5daf5aefb
parent0ac70e08c2e4d67da616ef1d30297e5cc675bfe9
xfs: factor xfs_alloc_vextent_this_ag() for  _iterate_ags()

Source kernel commit: 2edf06a50f5bbe664283f3c55c480fc013221d70

The core of the per-ag iteration is effectively doing a "this ag"
allocation on one AG at a time. Use the same code to implement the
core "this ag" allocation in both xfs_alloc_vextent_this_ag()
and xfs_alloc_vextent_iterate_ags().

This means we only call xfs_alloc_ag_vextent() from one place so we
can easily collapse the call stack in future patches.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
libxfs/xfs_alloc.c