@@ -26,6 +26,7 @@
#define xfs_alloc_ag_max_usable libxfs_alloc_ag_max_usable
#define xfs_allocbt_calc_size libxfs_allocbt_calc_size
+#define xfs_allocbt_init_cursor libxfs_allocbt_init_cursor
#define xfs_allocbt_maxlevels_ondisk libxfs_allocbt_maxlevels_ondisk
#define xfs_allocbt_maxrecs libxfs_allocbt_maxrecs
#define xfs_allocbt_stage_cursor libxfs_allocbt_stage_cursor
@@ -63,6 +64,7 @@
#define xfs_btree_del_cursor libxfs_btree_del_cursor
#define xfs_btree_init_block libxfs_btree_init_block
#define xfs_btree_rec_addr libxfs_btree_rec_addr
+#define xfs_btree_stage_afakeroot libxfs_btree_stage_afakeroot
#define xfs_buf_delwri_submit libxfs_buf_delwri_submit
#define xfs_buf_get libxfs_buf_get
#define xfs_buf_get_uncached libxfs_buf_get_uncached
@@ -546,21 +546,6 @@ xfs_allocbt_init_cursor(
return cur;
}
-/* Create a free space btree cursor with a fake root for staging. */
-struct xfs_btree_cur *
-xfs_allocbt_stage_cursor(
- struct xfs_mount *mp,
- struct xbtree_afakeroot *afake,
- struct xfs_perag *pag,
- xfs_btnum_t btnum)
-{
- struct xfs_btree_cur *cur;
-
- cur = xfs_allocbt_init_cursor(mp, NULL, NULL, pag, btnum);
- xfs_btree_stage_afakeroot(cur, afake);
- return cur;
-}
-
/*
* Install a new free space btree root. Caller is responsible for invalidating
* and freeing the old btree blocks.
@@ -50,9 +50,6 @@ struct xbtree_afakeroot;
extern struct xfs_btree_cur *xfs_allocbt_init_cursor(struct xfs_mount *mp,
struct xfs_trans *tp, struct xfs_buf *bp,
struct xfs_perag *pag, xfs_btnum_t btnum);
-struct xfs_btree_cur *xfs_allocbt_stage_cursor(struct xfs_mount *mp,
- struct xbtree_afakeroot *afake, struct xfs_perag *pag,
- xfs_btnum_t btnum);
extern int xfs_allocbt_maxrecs(struct xfs_mount *, int, int);
extern xfs_extlen_t xfs_allocbt_calc_size(struct xfs_mount *mp,
unsigned long long len);
@@ -262,10 +262,13 @@ init_freespace_cursors(
init_rebuild(sc, &XFS_RMAP_OINFO_AG, est_agfreeblocks, btr_bno);
init_rebuild(sc, &XFS_RMAP_OINFO_AG, est_agfreeblocks, btr_cnt);
- btr_bno->cur = libxfs_allocbt_stage_cursor(sc->mp,
- &btr_bno->newbt.afake, pag, XFS_BTNUM_BNO);
- btr_cnt->cur = libxfs_allocbt_stage_cursor(sc->mp,
- &btr_cnt->newbt.afake, pag, XFS_BTNUM_CNT);
+ btr_bno->cur = libxfs_allocbt_init_cursor(sc->mp, NULL, NULL, pag,
+ XFS_BTNUM_BNO);
+ libxfs_btree_stage_afakeroot(btr_bno->cur, &btr_bno->newbt.afake);
+
+ btr_cnt->cur = libxfs_allocbt_init_cursor(sc->mp, NULL, NULL, pag,
+ XFS_BTNUM_CNT);
+ libxfs_btree_stage_afakeroot(btr_cnt->cur, &btr_cnt->newbt.afake);
btr_bno->bload.get_records = get_bnobt_records;
btr_bno->bload.claim_block = rebuild_claim_block;