aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/scrub
diff options
context:
space:
mode:
authorGravatar Dave Chinner <dchinner@redhat.com> 2023-02-13 09:14:54 +1100
committerGravatar Dave Chinner <dchinner@redhat.com> 2023-02-13 09:14:54 +1100
commit5f36b2ce79f254dd00cdc88374271df7ce843d56 (patch)
treeaf462c68a7e91f992134c5b861f8215c28c0659e /fs/xfs/scrub
parentxfs: introduce xfs_alloc_vextent_near_bno() (diff)
downloadlinux-5f36b2ce79f254dd00cdc88374271df7ce843d56.tar.gz
linux-5f36b2ce79f254dd00cdc88374271df7ce843d56.tar.bz2
linux-5f36b2ce79f254dd00cdc88374271df7ce843d56.zip
xfs: introduce xfs_alloc_vextent_exact_bno()
Two of the callers to xfs_alloc_vextent_this_ag() actually want exact block number allocation, not anywhere-in-ag allocation. Split this out from _this_ag() as a first class citizen so no external extent allocation code needs to care about args->type anymore. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r--fs/xfs/scrub/repair.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
index 5f4b50aac4bb..1b71174ec0d6 100644
--- a/fs/xfs/scrub/repair.c
+++ b/fs/xfs/scrub/repair.c
@@ -328,14 +328,12 @@ xrep_alloc_ag_block(
args.mp = sc->mp;
args.pag = sc->sa.pag;
args.oinfo = *oinfo;
- args.fsbno = XFS_AGB_TO_FSB(args.mp, sc->sa.pag->pag_agno, 0);
args.minlen = 1;
args.maxlen = 1;
args.prod = 1;
- args.type = XFS_ALLOCTYPE_THIS_AG;
args.resv = resv;
- error = xfs_alloc_vextent_this_ag(&args);
+ error = xfs_alloc_vextent_this_ag(&args, sc->sa.pag->pag_agno);
if (error)
return error;
if (args.fsbno == NULLFSBLOCK)