]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: use xfs_alloc_vextent_first_ag() where appropriate
authorDave Chinner <dchinner@redhat.com>
Tue, 9 May 2023 09:30:23 +0000 (11:30 +0200)
committerCarlos Maiolino <cem@kernel.org>
Wed, 10 May 2023 12:05:21 +0000 (14:05 +0200)
commit5ba1f9152aeaffb36a707c9382bba3f22236f07a
treec35772181b2f4aad47b339640d76df3d22d07a24
parent3ed4e682ea48ce7f6b9e117c3282267db197a073
xfs: use xfs_alloc_vextent_first_ag() where appropriate

Source kernel commit: 319c9e874ac8721acdb6583e3459ef595e5ed0a6

Change obvious callers of single AG allocation to use
xfs_alloc_vextent_first_ag(). This gets rid of
XFS_ALLOCTYPE_FIRST_AG as the type used within
xfs_alloc_vextent_first_ag() during iteration is _THIS_AG. Hence we
can remove the setting of args->type from all the callers of
_first_ag() and remove the alloctype.

While doing this, pass the allocation target fsb as a parameter
rather than encoding it in args->fsbno. This starts the process
of making args->fsbno an output only variable rather than
input/output.

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/xfs_alloc.c
libxfs/xfs_alloc.h
libxfs/xfs_bmap.c