mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
committed by
Darrick J. Wong
parent
4803992619
commit
1c8b9fd278
@@ -412,8 +412,8 @@ xchk_rmapbt_walk_ag_metadata(
|
||||
/* OWN_AG: bnobt, cntbt, rmapbt, and AGFL */
|
||||
cur = sc->sa.bno_cur;
|
||||
if (!cur)
|
||||
cur = xfs_allocbt_init_cursor(sc->mp, sc->tp, sc->sa.agf_bp,
|
||||
sc->sa.pag, XFS_BTNUM_BNO);
|
||||
cur = xfs_bnobt_init_cursor(sc->mp, sc->tp, sc->sa.agf_bp,
|
||||
sc->sa.pag);
|
||||
error = xagb_bitmap_set_btblocks(&cr->ag_owned, cur);
|
||||
if (cur != sc->sa.bno_cur)
|
||||
xfs_btree_del_cursor(cur, error);
|
||||
@@ -422,8 +422,8 @@ xchk_rmapbt_walk_ag_metadata(
|
||||
|
||||
cur = sc->sa.cnt_cur;
|
||||
if (!cur)
|
||||
cur = xfs_allocbt_init_cursor(sc->mp, sc->tp, sc->sa.agf_bp,
|
||||
sc->sa.pag, XFS_BTNUM_CNT);
|
||||
cur = xfs_cntbt_init_cursor(sc->mp, sc->tp, sc->sa.agf_bp,
|
||||
sc->sa.pag);
|
||||
error = xagb_bitmap_set_btblocks(&cr->ag_owned, cur);
|
||||
if (cur != sc->sa.cnt_cur)
|
||||
xfs_btree_del_cursor(cur, error);
|
||||
|
||||
Reference in New Issue
Block a user