xfs: refactor the filestreams allocator pick functions
authorDave Chinner <dchinner@redhat.com>
Sun, 12 Feb 2023 22:14:56 +0000 (09:14 +1100)
committerDave Chinner <dchinner@redhat.com>
Sun, 12 Feb 2023 22:14:56 +0000 (09:14 +1100)
commitbd4f5d09cc93c8ca51e4efea86ac90a4bb553d6e
tree0e222d843e98ce03b4c70fa14f744ae3a44a2507
parentf8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6
xfs: refactor the filestreams allocator pick functions

Now that the filestreams allocator is largely rewritten,
restructure the main entry point and pick function to seperate out
the different operations cleanly. The MRU lookup function should not
handle the start AG selection on MRU lookup failure, and nor should
the pick function handle building the association that is inserted
into the MRU.

This leaves the filestreams allocator fairly clean and easy to
understand, returning to the caller with an active perag reference
and a target block to allocate at.

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