diff options
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index 36101e55ed07..1dc244d15a75 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -728,7 +728,7 @@ xfs_alloc_ag_vextent( ASSERT(args->len >= args->minlen); ASSERT(args->len <= args->maxlen); - ASSERT(!args->wasfromfl || args->resv != XFS_AG_RESV_AGFL); + ASSERT(!args->wasfromfl || args->resv != XFS_AG_RESV_RMAPBT); ASSERT(args->agbno % args->alignment == 0); /* if not file data, insert new block into the reverse map btree */ @@ -1600,7 +1600,7 @@ xfs_alloc_ag_vextent_small( * freelist. */ else if (args->minlen == 1 && args->alignment == 1 && - args->resv != XFS_AG_RESV_AGFL && + args->resv != XFS_AG_RESV_RMAPBT && (be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_flcount) > args->minleft)) { error = xfs_alloc_get_freelist(args->tp, args->agbp, &fbno, 0); @@ -1634,7 +1634,7 @@ xfs_alloc_ag_vextent_small( * If we're feeding an AGFL block to something that * doesn't live in the free space, we need to clear * out the OWN_AG rmap and add the block back to - * the AGFL per-AG reservation. + * the RMAPBT per-AG reservation. */ xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG); error = xfs_rmap_free(args->tp, args->agbp, args->agno, @@ -1642,7 +1642,7 @@ xfs_alloc_ag_vextent_small( if (error) goto error0; pag = xfs_perag_get(args->mp, args->agno); - xfs_ag_resv_free_extent(pag, XFS_AG_RESV_AGFL, + xfs_ag_resv_free_extent(pag, XFS_AG_RESV_RMAPBT, args->tp, 1); xfs_perag_put(pag); @@ -1928,14 +1928,12 @@ xfs_free_ag_extent( XFS_STATS_INC(mp, xs_freex); XFS_STATS_ADD(mp, xs_freeb, len); - trace_xfs_free_extent(mp, agno, bno, len, type == XFS_AG_RESV_AGFL, - haveleft, haveright); + trace_xfs_free_extent(mp, agno, bno, len, type, haveleft, haveright); return 0; error0: - trace_xfs_free_extent(mp, agno, bno, len, type == XFS_AG_RESV_AGFL, - -1, -1); + trace_xfs_free_extent(mp, agno, bno, len, type, -1, -1); if (bno_cur) xfs_btree_del_cursor(bno_cur, XFS_BTREE_ERROR); if (cnt_cur) @@ -2172,7 +2170,7 @@ xfs_alloc_fix_freelist( if (error) goto out_agbp_relse; error = xfs_free_ag_extent(tp, agbp, args->agno, bno, 1, - &targs.oinfo, XFS_AG_RESV_AGFL); + &targs.oinfo, XFS_AG_RESV_RMAPBT); if (error) goto out_agbp_relse; bp = xfs_btree_get_bufs(mp, tp, args->agno, bno, 0); @@ -2198,7 +2196,7 @@ xfs_alloc_fix_freelist( while (pag->pagf_flcount < need) { targs.agbno = 0; targs.maxlen = need - pag->pagf_flcount; - targs.resv = XFS_AG_RESV_AGFL; + targs.resv = XFS_AG_RESV_RMAPBT; /* Allocate as many blocks as possible at once. */ error = xfs_alloc_ag_vextent(&targs); @@ -2879,7 +2877,7 @@ xfs_free_extent( int error; ASSERT(len != 0); - ASSERT(type != XFS_AG_RESV_AGFL); + ASSERT(type != XFS_AG_RESV_RMAPBT); if (XFS_TEST_ERROR(false, mp, XFS_ERRTAG_FREE_EXTENT)) |