]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: online repair of the realtime rmap btree
authorDarrick J. Wong <djwong@kernel.org>
Wed, 3 Jul 2024 21:22:19 +0000 (14:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 16 Jul 2024 22:49:20 +0000 (15:49 -0700)
Repair the realtime rmap btree while mounted.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/xfs_btree_staging.c
libxfs/xfs_rtrmap_btree.c
libxfs/xfs_rtrmap_btree.h

index 48953c12d3f5cc5d5cc0b40ea52596c53251dafd..4dc75deecf01d74dba16177dfee2434f0644e988 100644 (file)
@@ -134,6 +134,7 @@ xfs_btree_stage_ifakeroot(
        cur->bc_ino.ifake = ifake;
        cur->bc_nlevels = ifake->if_levels;
        cur->bc_ino.forksize = ifake->if_fork_size;
+       cur->bc_ino.whichfork = XFS_STAGING_FORK;
        cur->bc_flags |= XFS_BTREE_STAGING;
 }
 
index 80a7cff6501752179483a5444d634532734524b9..ef713988c8b9b72cc95fdb5f08f0f20785b331a3 100644 (file)
@@ -640,7 +640,7 @@ xfs_rtrmapbt_compute_maxlevels(
 }
 
 /* Calculate the rtrmap btree size for some records. */
-static unsigned long long
+unsigned long long
 xfs_rtrmapbt_calc_size(
        struct xfs_mount        *mp,
        unsigned long long      len)
index 4d7d66fd85c01c9455834aa824e6c92371a59b86..20ebc4cfacb81685a739d88e5884806b27fe9180 100644 (file)
@@ -202,4 +202,7 @@ struct xfs_imeta_update;
 
 int xfs_rtrmapbt_create(struct xfs_imeta_update *upd);
 
+unsigned long long xfs_rtrmapbt_calc_size(struct xfs_mount *mp,
+               unsigned long long len);
+
 #endif /* __XFS_RTRMAP_BTREE_H__ */