aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_bmap_btree.c
diff options
context:
space:
mode:
authorGravatar Dave Chinner <dchinner@redhat.com> 2023-02-13 09:14:53 +1100
committerGravatar Dave Chinner <dchinner@redhat.com> 2023-02-13 09:14:53 +1100
commit2a7f6d41d8b72412228ede538bdf0e81bf9738f4 (patch)
treecaa513dbfa286d2420eb4f750aaaed9dc61b71e2 /fs/xfs/libxfs/xfs_bmap_btree.c
parentxfs: use xfs_alloc_vextent_first_ag() where appropriate (diff)
downloadlinux-2a7f6d41d8b72412228ede538bdf0e81bf9738f4.tar.gz
linux-2a7f6d41d8b72412228ede538bdf0e81bf9738f4.tar.bz2
linux-2a7f6d41d8b72412228ede538bdf0e81bf9738f4.zip
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.c9
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;