xfs: merge new filestream AG selection into xfs_filestream_select_ag()
authorDave Chinner <dchinner@redhat.com>
Sun, 12 Feb 2023 22:14:55 +0000 (09:14 +1100)
committerDave Chinner <dchinner@redhat.com>
Sun, 12 Feb 2023 22:14:55 +0000 (09:14 +1100)
commitba34de8defe013e4062bdc2ed57d748d6807a96a
tree7598588ee216ee7a99dadc94928f3d63343d4b9c
parenta52dc2ad363088d0e0ab05a71f0496e2377e5cc9
xfs: merge new filestream AG selection into xfs_filestream_select_ag()

This is largely a wrapper around xfs_filestream_pick_ag() that
repeats a lot of the lookups that we just merged back into
xfs_filestream_select_ag() from the lookup code. Merge the
xfs_filestream_new_ag() code back into _select_ag() to get rid
of all the unnecessary logic.

Indeed, this makes it obvious that if we have no parent inode,
the filestreams allocator always selects AG 0 regardless of whether
it is fit for purpose or not.

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