]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: move xfs_bmap_btalloc_filestreams() to xfs_filestreams.c
authorDave Chinner <dchinner@redhat.com>
Tue, 9 May 2023 09:30:44 +0000 (11:30 +0200)
committerCarlos Maiolino <cem@kernel.org>
Wed, 10 May 2023 12:59:10 +0000 (14:59 +0200)
commit12ae681874a07011c4cb75224693c155d7cd1284
tree9412e40d0adc4dabec2eb5b6e7732f8d13a00cee
parentc92d3040144be827dc4670a849b5e2e0f7858cda
xfs: move xfs_bmap_btalloc_filestreams() to xfs_filestreams.c

Source kernel commit: 8f7747ad8c52cde585b9456f6dbd1984af7b97bc

xfs_bmap_btalloc_filestreams() calls two filestreams functions to
select the AG to allocate from. Both those functions end up in
the same selection function that iterates all AGs multiple times.
Worst case, xfs_bmap_btalloc_filestreams() can iterate all AGs 4
times just to select the initial AG to allocate in.

Move the AG selection to fs/xfs/xfs_filestreams.c as a single
interface so that the inefficient AG interation is contained
entirely within the filestreams code. This will allow the
implementation to be simplified and made more efficient 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/libxfs_priv.h
libxfs/xfs_bmap.c
libxfs/xfs_bmap.h