]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: online repair of the realtime rmap btree
authorDarrick J. Wong <djwong@kernel.org>
Sat, 10 Aug 2024 19:42:27 +0000 (21:42 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 12 Aug 2024 11:53:50 +0000 (13:53 +0200)
Source kernel commit: f813af307d62d4c4d620a358bbd406f89ffdeca2

Repair the realtime rmap btree while mounted.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
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 005715b7246b0c3ba1bfab53981cee304cac78dc..f11d0acb594578f685ad70e7709e5b55efae7e01 100644 (file)
@@ -641,7 +641,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 33b79daa813ded846c1afa043dbebd44f58d20bc..910b260184dfdd7d99637e2389cc6b1dd723eaa4 100644 (file)
@@ -197,4 +197,7 @@ void xfs_iflush_rtrmap(struct xfs_inode *ip, struct xfs_dinode *dip);
 int xfs_rtrmapbt_create(struct xfs_rtgroup *rtg, struct xfs_inode *ip,
                struct xfs_trans *tp, bool init);
 
+unsigned long long xfs_rtrmapbt_calc_size(struct xfs_mount *mp,
+               unsigned long long len);
+
 #endif /* __XFS_RTRMAP_BTREE_H__ */