xfs: rework xfs_alloc_vextent()
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)
commitecd788a92460eef44c5444290757bfd0f38d91b4
tree99f803895e57542df48f3064d8517950fb2b6ea8
parent76257a15873ccce817e0c4441f6bb66fb8f8201c
xfs: rework xfs_alloc_vextent()

It's a multiplexing mess that can be greatly simplified, and really
needs to be simplified to allow active per-ag references to
propagate from initial AG selection code the the bmapi code.

This splits the code out into separate a parameter checking
function, an iterator function, and allocation completion functions
and then implements the individual policies using these functions.

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