diff options
author | Dave Chinner <dchinner@redhat.com> | 2023-02-12 23:14:54 +0100 |
---|---|---|
committer | Dave Chinner <dchinner@redhat.com> | 2023-02-12 23:14:54 +0100 |
commit | 5f36b2ce79f254dd00cdc88374271df7ce843d56 (patch) | |
tree | af462c68a7e91f992134c5b861f8215c28c0659e /fs/xfs/scrub/repair.c | |
parent | xfs: introduce xfs_alloc_vextent_near_bno() (diff) | |
download | linux-5f36b2ce79f254dd00cdc88374271df7ce843d56.tar.xz 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/repair.c')
-rw-r--r-- | fs/xfs/scrub/repair.c | 4 |
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) |