Commit 1c8b9fd2 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: split xfs_allocbt_init_cursor

Split xfs_allocbt_init_cursor into separate routines for the by-bno
and by-cnt btrees to prepare for the removal of the xfs_btnum global
enumeration of btree types.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent 48039926
...@@ -862,8 +862,8 @@ xfs_alloc_cur_setup( ...@@ -862,8 +862,8 @@ xfs_alloc_cur_setup(
* attempt a small allocation. * attempt a small allocation.
*/ */
if (!acur->cnt) if (!acur->cnt)
acur->cnt = xfs_allocbt_init_cursor(args->mp, args->tp, acur->cnt = xfs_cntbt_init_cursor(args->mp, args->tp,
args->agbp, args->pag, XFS_BTNUM_CNT); args->agbp, args->pag);
error = xfs_alloc_lookup_ge(acur->cnt, 0, args->maxlen, &i); error = xfs_alloc_lookup_ge(acur->cnt, 0, args->maxlen, &i);
if (error) if (error)
return error; return error;
...@@ -872,11 +872,11 @@ xfs_alloc_cur_setup( ...@@ -872,11 +872,11 @@ xfs_alloc_cur_setup(
* Allocate the bnobt left and right search cursors. * Allocate the bnobt left and right search cursors.
*/ */
if (!acur->bnolt) if (!acur->bnolt)
acur->bnolt = xfs_allocbt_init_cursor(args->mp, args->tp, acur->bnolt = xfs_bnobt_init_cursor(args->mp, args->tp,
args->agbp, args->pag, XFS_BTNUM_BNO); args->agbp, args->pag);
if (!acur->bnogt) if (!acur->bnogt)
acur->bnogt = xfs_allocbt_init_cursor(args->mp, args->tp, acur->bnogt = xfs_bnobt_init_cursor(args->mp, args->tp,
args->agbp, args->pag, XFS_BTNUM_BNO); args->agbp, args->pag);
return i == 1 ? 0 : -ENOSPC; return i == 1 ? 0 : -ENOSPC;
} }
...@@ -1234,8 +1234,8 @@ xfs_alloc_ag_vextent_exact( ...@@ -1234,8 +1234,8 @@ xfs_alloc_ag_vextent_exact(
/* /*
* Allocate/initialize a cursor for the by-number freespace btree. * Allocate/initialize a cursor for the by-number freespace btree.
*/ */
bno_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, bno_cur = xfs_bnobt_init_cursor(args->mp, args->tp, args->agbp,
args->pag, XFS_BTNUM_BNO); args->pag);
/* /*
* Lookup bno and minlen in the btree (minlen is irrelevant, really). * Lookup bno and minlen in the btree (minlen is irrelevant, really).
...@@ -1295,8 +1295,8 @@ xfs_alloc_ag_vextent_exact( ...@@ -1295,8 +1295,8 @@ xfs_alloc_ag_vextent_exact(
* We are allocating agbno for args->len * We are allocating agbno for args->len
* Allocate/initialize a cursor for the by-size btree. * Allocate/initialize a cursor for the by-size btree.
*/ */
cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, cnt_cur = xfs_cntbt_init_cursor(args->mp, args->tp, args->agbp,
args->pag, XFS_BTNUM_CNT); args->pag);
ASSERT(args->agbno + args->len <= be32_to_cpu(agf->agf_length)); ASSERT(args->agbno + args->len <= be32_to_cpu(agf->agf_length));
error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen, args->agbno, error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen, args->agbno,
args->len, XFSA_FIXUP_BNO_OK); args->len, XFSA_FIXUP_BNO_OK);
...@@ -1710,8 +1710,8 @@ xfs_alloc_ag_vextent_size( ...@@ -1710,8 +1710,8 @@ xfs_alloc_ag_vextent_size(
/* /*
* Allocate and initialize a cursor for the by-size btree. * Allocate and initialize a cursor for the by-size btree.
*/ */
cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, cnt_cur = xfs_cntbt_init_cursor(args->mp, args->tp, args->agbp,
args->pag, XFS_BTNUM_CNT); args->pag);
bno_cur = NULL; bno_cur = NULL;
/* /*
...@@ -1896,8 +1896,8 @@ xfs_alloc_ag_vextent_size( ...@@ -1896,8 +1896,8 @@ xfs_alloc_ag_vextent_size(
/* /*
* Allocate and initialize a cursor for the by-block tree. * Allocate and initialize a cursor for the by-block tree.
*/ */
bno_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, bno_cur = xfs_bnobt_init_cursor(args->mp, args->tp, args->agbp,
args->pag, XFS_BTNUM_BNO); args->pag);
if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen, if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen,
rbno, rlen, XFSA_FIXUP_CNT_OK))) rbno, rlen, XFSA_FIXUP_CNT_OK)))
goto error0; goto error0;
...@@ -1971,7 +1971,7 @@ xfs_free_ag_extent( ...@@ -1971,7 +1971,7 @@ xfs_free_ag_extent(
/* /*
* Allocate and initialize a cursor for the by-block btree. * Allocate and initialize a cursor for the by-block btree.
*/ */
bno_cur = xfs_allocbt_init_cursor(mp, tp, agbp, pag, XFS_BTNUM_BNO); bno_cur = xfs_bnobt_init_cursor(mp, tp, agbp, pag);
/* /*
* Look for a neighboring block on the left (lower block numbers) * Look for a neighboring block on the left (lower block numbers)
* that is contiguous with this space. * that is contiguous with this space.
...@@ -2045,7 +2045,7 @@ xfs_free_ag_extent( ...@@ -2045,7 +2045,7 @@ xfs_free_ag_extent(
/* /*
* Now allocate and initialize a cursor for the by-size tree. * Now allocate and initialize a cursor for the by-size tree.
*/ */
cnt_cur = xfs_allocbt_init_cursor(mp, tp, agbp, pag, XFS_BTNUM_CNT); cnt_cur = xfs_cntbt_init_cursor(mp, tp, agbp, pag);
/* /*
* Have both left and right contiguous neighbors. * Have both left and right contiguous neighbors.
* Merge all three into a single free block. * Merge all three into a single free block.
...@@ -2754,8 +2754,8 @@ xfs_exact_minlen_extent_available( ...@@ -2754,8 +2754,8 @@ xfs_exact_minlen_extent_available(
xfs_extlen_t flen; xfs_extlen_t flen;
int error = 0; int error = 0;
cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, agbp, cnt_cur = xfs_cntbt_init_cursor(args->mp, args->tp, agbp,
args->pag, XFS_BTNUM_CNT); args->pag);
error = xfs_alloc_lookup_ge(cnt_cur, 0, args->minlen, stat); error = xfs_alloc_lookup_ge(cnt_cur, 0, args->minlen, stat);
if (error) if (error)
goto out; goto out;
......
...@@ -24,13 +24,22 @@ ...@@ -24,13 +24,22 @@
static struct kmem_cache *xfs_allocbt_cur_cache; static struct kmem_cache *xfs_allocbt_cur_cache;
STATIC struct xfs_btree_cur * STATIC struct xfs_btree_cur *
xfs_allocbt_dup_cursor( xfs_bnobt_dup_cursor(
struct xfs_btree_cur *cur) struct xfs_btree_cur *cur)
{ {
return xfs_allocbt_init_cursor(cur->bc_mp, cur->bc_tp, return xfs_bnobt_init_cursor(cur->bc_mp, cur->bc_tp, cur->bc_ag.agbp,
cur->bc_ag.agbp, cur->bc_ag.pag, cur->bc_btnum); cur->bc_ag.pag);
} }
STATIC struct xfs_btree_cur *
xfs_cntbt_dup_cursor(
struct xfs_btree_cur *cur)
{
return xfs_cntbt_init_cursor(cur->bc_mp, cur->bc_tp, cur->bc_ag.agbp,
cur->bc_ag.pag);
}
STATIC void STATIC void
xfs_allocbt_set_root( xfs_allocbt_set_root(
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
...@@ -480,7 +489,7 @@ const struct xfs_btree_ops xfs_bnobt_ops = { ...@@ -480,7 +489,7 @@ const struct xfs_btree_ops xfs_bnobt_ops = {
.statoff = XFS_STATS_CALC_INDEX(xs_abtb_2), .statoff = XFS_STATS_CALC_INDEX(xs_abtb_2),
.sick_mask = XFS_SICK_AG_BNOBT, .sick_mask = XFS_SICK_AG_BNOBT,
.dup_cursor = xfs_allocbt_dup_cursor, .dup_cursor = xfs_bnobt_dup_cursor,
.set_root = xfs_allocbt_set_root, .set_root = xfs_allocbt_set_root,
.alloc_block = xfs_allocbt_alloc_block, .alloc_block = xfs_allocbt_alloc_block,
.free_block = xfs_allocbt_free_block, .free_block = xfs_allocbt_free_block,
...@@ -512,7 +521,7 @@ const struct xfs_btree_ops xfs_cntbt_ops = { ...@@ -512,7 +521,7 @@ const struct xfs_btree_ops xfs_cntbt_ops = {
.statoff = XFS_STATS_CALC_INDEX(xs_abtc_2), .statoff = XFS_STATS_CALC_INDEX(xs_abtc_2),
.sick_mask = XFS_SICK_AG_CNTBT, .sick_mask = XFS_SICK_AG_CNTBT,
.dup_cursor = xfs_allocbt_dup_cursor, .dup_cursor = xfs_cntbt_dup_cursor,
.set_root = xfs_allocbt_set_root, .set_root = xfs_allocbt_set_root,
.alloc_block = xfs_allocbt_alloc_block, .alloc_block = xfs_allocbt_alloc_block,
.free_block = xfs_allocbt_free_block, .free_block = xfs_allocbt_free_block,
...@@ -532,36 +541,53 @@ const struct xfs_btree_ops xfs_cntbt_ops = { ...@@ -532,36 +541,53 @@ const struct xfs_btree_ops xfs_cntbt_ops = {
}; };
/* /*
* Allocate a new allocation btree cursor. * Allocate a new bnobt cursor.
* *
* For staging cursors tp and agbp are NULL. * For staging cursors tp and agbp are NULL.
*/ */
struct xfs_btree_cur * struct xfs_btree_cur *
xfs_allocbt_init_cursor( xfs_bnobt_init_cursor(
struct xfs_mount *mp, struct xfs_mount *mp,
struct xfs_trans *tp, struct xfs_trans *tp,
struct xfs_buf *agbp, struct xfs_buf *agbp,
struct xfs_perag *pag, struct xfs_perag *pag)
xfs_btnum_t btnum)
{ {
const struct xfs_btree_ops *ops = &xfs_bnobt_ops;
struct xfs_btree_cur *cur; struct xfs_btree_cur *cur;
ASSERT(btnum == XFS_BTNUM_BNO || btnum == XFS_BTNUM_CNT); cur = xfs_btree_alloc_cursor(mp, tp, XFS_BTNUM_BNO, &xfs_bnobt_ops,
mp->m_alloc_maxlevels, xfs_allocbt_cur_cache);
cur->bc_ag.pag = xfs_perag_hold(pag);
cur->bc_ag.agbp = agbp;
if (agbp) {
struct xfs_agf *agf = agbp->b_addr;
cur->bc_nlevels = be32_to_cpu(agf->agf_bno_level);
}
return cur;
}
if (btnum == XFS_BTNUM_CNT) /*
ops = &xfs_cntbt_ops; * Allocate a new cntbt cursor.
*
* For staging cursors tp and agbp are NULL.
*/
struct xfs_btree_cur *
xfs_cntbt_init_cursor(
struct xfs_mount *mp,
struct xfs_trans *tp,
struct xfs_buf *agbp,
struct xfs_perag *pag)
{
struct xfs_btree_cur *cur;
cur = xfs_btree_alloc_cursor(mp, tp, btnum, ops, mp->m_alloc_maxlevels, cur = xfs_btree_alloc_cursor(mp, tp, XFS_BTNUM_CNT, &xfs_cntbt_ops,
xfs_allocbt_cur_cache); mp->m_alloc_maxlevels, xfs_allocbt_cur_cache);
cur->bc_ag.pag = xfs_perag_hold(pag); cur->bc_ag.pag = xfs_perag_hold(pag);
cur->bc_ag.agbp = agbp; cur->bc_ag.agbp = agbp;
if (agbp) { if (agbp) {
struct xfs_agf *agf = agbp->b_addr; struct xfs_agf *agf = agbp->b_addr;
cur->bc_nlevels = (btnum == XFS_BTNUM_BNO) ? cur->bc_nlevels = be32_to_cpu(agf->agf_cnt_level);
be32_to_cpu(agf->agf_bno_level) :
be32_to_cpu(agf->agf_cnt_level);
} }
return cur; return cur;
} }
......
...@@ -47,9 +47,12 @@ struct xbtree_afakeroot; ...@@ -47,9 +47,12 @@ struct xbtree_afakeroot;
(maxrecs) * sizeof(xfs_alloc_key_t) + \ (maxrecs) * sizeof(xfs_alloc_key_t) + \
((index) - 1) * sizeof(xfs_alloc_ptr_t))) ((index) - 1) * sizeof(xfs_alloc_ptr_t)))
extern struct xfs_btree_cur *xfs_allocbt_init_cursor(struct xfs_mount *mp, struct xfs_btree_cur *xfs_bnobt_init_cursor(struct xfs_mount *mp,
struct xfs_trans *tp, struct xfs_buf *bp, struct xfs_trans *tp, struct xfs_buf *bp,
struct xfs_perag *pag, xfs_btnum_t btnum); struct xfs_perag *pag);
struct xfs_btree_cur *xfs_cntbt_init_cursor(struct xfs_mount *mp,
struct xfs_trans *tp, struct xfs_buf *bp,
struct xfs_perag *pag);
extern int xfs_allocbt_maxrecs(struct xfs_mount *, int, int); extern int xfs_allocbt_maxrecs(struct xfs_mount *, int, int);
extern xfs_extlen_t xfs_allocbt_calc_size(struct xfs_mount *mp, extern xfs_extlen_t xfs_allocbt_calc_size(struct xfs_mount *mp,
unsigned long long len); unsigned long long len);
......
...@@ -255,8 +255,7 @@ xrep_agf_calc_from_btrees( ...@@ -255,8 +255,7 @@ xrep_agf_calc_from_btrees(
int error; int error;
/* Update the AGF counters from the bnobt. */ /* Update the AGF counters from the bnobt. */
cur = xfs_allocbt_init_cursor(mp, sc->tp, agf_bp, cur = xfs_bnobt_init_cursor(mp, sc->tp, agf_bp, sc->sa.pag);
sc->sa.pag, XFS_BTNUM_BNO);
error = xfs_alloc_query_all(cur, xrep_agf_walk_allocbt, &raa); error = xfs_alloc_query_all(cur, xrep_agf_walk_allocbt, &raa);
if (error) if (error)
goto err; goto err;
...@@ -269,8 +268,7 @@ xrep_agf_calc_from_btrees( ...@@ -269,8 +268,7 @@ xrep_agf_calc_from_btrees(
agf->agf_longest = cpu_to_be32(raa.longest); agf->agf_longest = cpu_to_be32(raa.longest);
/* Update the AGF counters from the cntbt. */ /* Update the AGF counters from the cntbt. */
cur = xfs_allocbt_init_cursor(mp, sc->tp, agf_bp, cur = xfs_cntbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.pag);
sc->sa.pag, XFS_BTNUM_CNT);
error = xfs_btree_count_blocks(cur, &blocks); error = xfs_btree_count_blocks(cur, &blocks);
if (error) if (error)
goto err; goto err;
...@@ -549,16 +547,14 @@ xrep_agfl_collect_blocks( ...@@ -549,16 +547,14 @@ xrep_agfl_collect_blocks(
goto out_bmp; goto out_bmp;
/* Find all blocks currently being used by the bnobt. */ /* Find all blocks currently being used by the bnobt. */
cur = xfs_allocbt_init_cursor(mp, sc->tp, agf_bp, cur = xfs_bnobt_init_cursor(mp, sc->tp, agf_bp, sc->sa.pag);
sc->sa.pag, XFS_BTNUM_BNO);
error = xagb_bitmap_set_btblocks(&ra.agmetablocks, cur); error = xagb_bitmap_set_btblocks(&ra.agmetablocks, cur);
xfs_btree_del_cursor(cur, error); xfs_btree_del_cursor(cur, error);
if (error) if (error)
goto out_bmp; goto out_bmp;
/* Find all blocks currently being used by the cntbt. */ /* Find all blocks currently being used by the cntbt. */
cur = xfs_allocbt_init_cursor(mp, sc->tp, agf_bp, cur = xfs_cntbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.pag);
sc->sa.pag, XFS_BTNUM_CNT);
error = xagb_bitmap_set_btblocks(&ra.agmetablocks, cur); error = xagb_bitmap_set_btblocks(&ra.agmetablocks, cur);
xfs_btree_del_cursor(cur, error); xfs_btree_del_cursor(cur, error);
if (error) if (error)
......
...@@ -735,12 +735,10 @@ xrep_abt_build_new_trees( ...@@ -735,12 +735,10 @@ xrep_abt_build_new_trees(
ra->new_cntbt.bload.claim_block = xrep_abt_claim_block; ra->new_cntbt.bload.claim_block = xrep_abt_claim_block;
/* Allocate cursors for the staged btrees. */ /* Allocate cursors for the staged btrees. */
bno_cur = xfs_allocbt_init_cursor(sc->mp, NULL, NULL, pag, bno_cur = xfs_bnobt_init_cursor(sc->mp, NULL, NULL, pag);
XFS_BTNUM_BNO);
xfs_btree_stage_afakeroot(bno_cur, &ra->new_bnobt.afake); xfs_btree_stage_afakeroot(bno_cur, &ra->new_bnobt.afake);
cnt_cur = xfs_allocbt_init_cursor(sc->mp, NULL, NULL, pag, cnt_cur = xfs_cntbt_init_cursor(sc->mp, NULL, NULL, pag);
XFS_BTNUM_CNT);
xfs_btree_stage_afakeroot(cnt_cur, &ra->new_cntbt.afake); xfs_btree_stage_afakeroot(cnt_cur, &ra->new_cntbt.afake);
/* Last chance to abort before we start committing fixes. */ /* Last chance to abort before we start committing fixes. */
......
...@@ -590,14 +590,14 @@ xchk_ag_btcur_init( ...@@ -590,14 +590,14 @@ xchk_ag_btcur_init(
if (sa->agf_bp) { if (sa->agf_bp) {
/* Set up a bnobt cursor for cross-referencing. */ /* Set up a bnobt cursor for cross-referencing. */
sa->bno_cur = xfs_allocbt_init_cursor(mp, sc->tp, sa->agf_bp, sa->bno_cur = xfs_bnobt_init_cursor(mp, sc->tp, sa->agf_bp,
sa->pag, XFS_BTNUM_BNO); sa->pag);
xchk_ag_btree_del_cursor_if_sick(sc, &sa->bno_cur, xchk_ag_btree_del_cursor_if_sick(sc, &sa->bno_cur,
XFS_SCRUB_TYPE_BNOBT); XFS_SCRUB_TYPE_BNOBT);
/* Set up a cntbt cursor for cross-referencing. */ /* Set up a cntbt cursor for cross-referencing. */
sa->cnt_cur = xfs_allocbt_init_cursor(mp, sc->tp, sa->agf_bp, sa->cnt_cur = xfs_cntbt_init_cursor(mp, sc->tp, sa->agf_bp,
sa->pag, XFS_BTNUM_CNT); sa->pag);
xchk_ag_btree_del_cursor_if_sick(sc, &sa->cnt_cur, xchk_ag_btree_del_cursor_if_sick(sc, &sa->cnt_cur,
XFS_SCRUB_TYPE_CNTBT); XFS_SCRUB_TYPE_CNTBT);
......
...@@ -832,10 +832,10 @@ xrep_ag_btcur_init( ...@@ -832,10 +832,10 @@ xrep_ag_btcur_init(
/* Set up a bnobt cursor for cross-referencing. */ /* Set up a bnobt cursor for cross-referencing. */
if (sc->sm->sm_type != XFS_SCRUB_TYPE_BNOBT && if (sc->sm->sm_type != XFS_SCRUB_TYPE_BNOBT &&
sc->sm->sm_type != XFS_SCRUB_TYPE_CNTBT) { sc->sm->sm_type != XFS_SCRUB_TYPE_CNTBT) {
sa->bno_cur = xfs_allocbt_init_cursor(mp, sc->tp, sa->agf_bp, sa->bno_cur = xfs_bnobt_init_cursor(mp, sc->tp, sa->agf_bp,
sc->sa.pag, XFS_BTNUM_BNO); sc->sa.pag);
sa->cnt_cur = xfs_allocbt_init_cursor(mp, sc->tp, sa->agf_bp, sa->cnt_cur = xfs_cntbt_init_cursor(mp, sc->tp, sa->agf_bp,
sc->sa.pag, XFS_BTNUM_CNT); sc->sa.pag);
} }
/* Set up a inobt cursor for cross-referencing. */ /* Set up a inobt cursor for cross-referencing. */
......
...@@ -412,8 +412,8 @@ xchk_rmapbt_walk_ag_metadata( ...@@ -412,8 +412,8 @@ xchk_rmapbt_walk_ag_metadata(
/* OWN_AG: bnobt, cntbt, rmapbt, and AGFL */ /* OWN_AG: bnobt, cntbt, rmapbt, and AGFL */
cur = sc->sa.bno_cur; cur = sc->sa.bno_cur;
if (!cur) if (!cur)
cur = xfs_allocbt_init_cursor(sc->mp, sc->tp, sc->sa.agf_bp, cur = xfs_bnobt_init_cursor(sc->mp, sc->tp, sc->sa.agf_bp,
sc->sa.pag, XFS_BTNUM_BNO); sc->sa.pag);
error = xagb_bitmap_set_btblocks(&cr->ag_owned, cur); error = xagb_bitmap_set_btblocks(&cr->ag_owned, cur);
if (cur != sc->sa.bno_cur) if (cur != sc->sa.bno_cur)
xfs_btree_del_cursor(cur, error); xfs_btree_del_cursor(cur, error);
...@@ -422,8 +422,8 @@ xchk_rmapbt_walk_ag_metadata( ...@@ -422,8 +422,8 @@ xchk_rmapbt_walk_ag_metadata(
cur = sc->sa.cnt_cur; cur = sc->sa.cnt_cur;
if (!cur) if (!cur)
cur = xfs_allocbt_init_cursor(sc->mp, sc->tp, sc->sa.agf_bp, cur = xfs_cntbt_init_cursor(sc->mp, sc->tp, sc->sa.agf_bp,
sc->sa.pag, XFS_BTNUM_CNT); sc->sa.pag);
error = xagb_bitmap_set_btblocks(&cr->ag_owned, cur); error = xagb_bitmap_set_btblocks(&cr->ag_owned, cur);
if (cur != sc->sa.cnt_cur) if (cur != sc->sa.cnt_cur)
xfs_btree_del_cursor(cur, error); xfs_btree_del_cursor(cur, error);
......
...@@ -179,7 +179,7 @@ xfs_trim_gather_extents( ...@@ -179,7 +179,7 @@ xfs_trim_gather_extents(
if (error) if (error)
goto out_trans_cancel; goto out_trans_cancel;
cur = xfs_allocbt_init_cursor(mp, tp, agbp, pag, XFS_BTNUM_CNT); cur = xfs_cntbt_init_cursor(mp, tp, agbp, pag);
/* /*
* Look up the extent length requested in the AGF and start with it. * Look up the extent length requested in the AGF and start with it.
......
...@@ -763,8 +763,8 @@ xfs_getfsmap_datadev_bnobt_query( ...@@ -763,8 +763,8 @@ xfs_getfsmap_datadev_bnobt_query(
return xfs_getfsmap_datadev_bnobt_helper(*curpp, &key[1], info); return xfs_getfsmap_datadev_bnobt_helper(*curpp, &key[1], info);
/* Allocate cursor for this AG and query_range it. */ /* Allocate cursor for this AG and query_range it. */
*curpp = xfs_allocbt_init_cursor(tp->t_mountp, tp, info->agf_bp, *curpp = xfs_bnobt_init_cursor(tp->t_mountp, tp, info->agf_bp,
info->pag, XFS_BTNUM_BNO); info->pag);
key->ar_startblock = info->low.rm_startblock; key->ar_startblock = info->low.rm_startblock;
key[1].ar_startblock = info->high.rm_startblock; key[1].ar_startblock = info->high.rm_startblock;
return xfs_alloc_query_range(*curpp, key, &key[1], return xfs_alloc_query_range(*curpp, key, &key[1],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment