]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs: remove xfs_allocbt_stage_cursor
authorChristoph Hellwig <hch@lst.de>
Mon, 22 Apr 2024 17:01:02 +0000 (10:01 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:38 +0000 (11:37 -0700)
Source kernel commit: 91796b2eef8bd725873bec326a7be830a68a11ff

Just open code the two calls in the callers.

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>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/libxfs_api_defs.h
libxfs/xfs_alloc_btree.c
libxfs/xfs_alloc_btree.h
repair/agbtree.c

index 769733ec2ee3bc8f22392235018d39be4feef242..9a2968906c4220283c2a428fbcdb740409469ff9 100644 (file)
@@ -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
index 13d2310cfa36f5ee7e9931a13c456cdd2faec7d6..bd7878b68931d4300bbd73ca8ddeeb7c8b7f3b61 100644 (file)
@@ -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.
index 45df893ef6bb00d473f717061ac1ca417ed0a39f..1c910862535f7a3436c538b3498be2da73a4d111 100644 (file)
@@ -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);
index 38f3f7b8feacbd2f08b314ec88332879f71fba55..d5fa4eafb633f36cd8c875fddd4c87fd70b377e2 100644 (file)
@@ -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;