diff options
author | Dave Chinner <dchinner@redhat.com> | 2023-02-13 01:14:53 +0300 |
---|---|---|
committer | Dave Chinner <dchinner@redhat.com> | 2023-02-13 01:14:53 +0300 |
commit | 2a7f6d41d8b72412228ede538bdf0e81bf9738f4 (patch) | |
tree | caa513dbfa286d2420eb4f750aaaed9dc61b71e2 /fs/xfs/libxfs/xfs_bmap_btree.c | |
parent | 319c9e874ac8721acdb6583e3459ef595e5ed0a6 (diff) | |
download | linux-2a7f6d41d8b72412228ede538bdf0e81bf9738f4.tar.xz |
xfs: use xfs_alloc_vextent_start_bno() where appropriate
Change obvious callers of single AG allocation to use
xfs_alloc_vextent_start_bno(). Callers no long need to specify
XFS_ALLOCTYPE_START_BNO, and so the type can be driven inward and
removed.
While doing this, also pass the allocation target fsb as a parameter
rather than encoding it in args->fsbno.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap_btree.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap_btree.c b/fs/xfs/libxfs/xfs_bmap_btree.c index d42c1a1da1fc..b8ad95050c9b 100644 --- a/fs/xfs/libxfs/xfs_bmap_btree.c +++ b/fs/xfs/libxfs/xfs_bmap_btree.c @@ -214,9 +214,6 @@ xfs_bmbt_alloc_block( if (!args.wasdel && args.tp->t_blk_res == 0) return -ENOSPC; - args.fsbno = be64_to_cpu(start->l); - args.type = XFS_ALLOCTYPE_START_BNO; - /* * If we are coming here from something like unwritten extent * conversion, there has been no data extent allocation already done, so @@ -227,7 +224,7 @@ xfs_bmbt_alloc_block( args.minleft = xfs_bmapi_minleft(cur->bc_tp, cur->bc_ino.ip, cur->bc_ino.whichfork); - error = xfs_alloc_vextent(&args); + error = xfs_alloc_vextent_start_ag(&args, be64_to_cpu(start->l)); if (error) return error; @@ -237,10 +234,8 @@ xfs_bmbt_alloc_block( * a full btree split. Try again and if * successful activate the lowspace algorithm. */ - args.fsbno = 0; args.minleft = 0; - args.type = XFS_ALLOCTYPE_START_BNO; - error = xfs_alloc_vextent(&args); + error = xfs_alloc_vextent_start_ag(&args, 0); if (error) return error; cur->bc_tp->t_flags |= XFS_TRANS_LOWMODE; |