xfs: factor xfs_alloc_vextent_this_ag() for _iterate_ags()
authorDave Chinner <dchinner@redhat.com>
Sun, 12 Feb 2023 22:14:53 +0000 (09:14 +1100)
committerDave Chinner <dchinner@redhat.com>
Sun, 12 Feb 2023 22:14:53 +0000 (09:14 +1100)
commit2edf06a50f5bbe664283f3c55c480fc013221d70
tree420242f0c88e608efa657aef7ccdee591494d721
parentecd788a92460eef44c5444290757bfd0f38d91b4
xfs: factor xfs_alloc_vextent_this_ag() for  _iterate_ags()

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>
fs/xfs/libxfs/xfs_alloc.c