From: Darrick J. Wong Date: Thu, 15 Aug 2024 18:57:36 +0000 (-0700) Subject: xfs: online repair of the realtime rmap btree X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=dfdd5ed68f3dda411a44be0da345e6c86f4f43e8;p=users%2Fhch%2Fxfsprogs.git xfs: online repair of the realtime rmap btree Source kernel commit: f813af307d62d4c4d620a358bbd406f89ffdeca2 Repair the realtime rmap btree while mounted. Signed-off-by: Darrick J. Wong Signed-off-by: Christoph Hellwig --- diff --git a/libxfs/xfs_btree_staging.c b/libxfs/xfs_btree_staging.c index 48953c12d..4dc75deec 100644 --- a/libxfs/xfs_btree_staging.c +++ b/libxfs/xfs_btree_staging.c @@ -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; } diff --git a/libxfs/xfs_rtrmap_btree.c b/libxfs/xfs_rtrmap_btree.c index 84987bb04..b2a7718ed 100644 --- a/libxfs/xfs_rtrmap_btree.c +++ b/libxfs/xfs_rtrmap_btree.c @@ -661,7 +661,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) diff --git a/libxfs/xfs_rtrmap_btree.h b/libxfs/xfs_rtrmap_btree.h index db313492b..6e3dab8c4 100644 --- a/libxfs/xfs_rtrmap_btree.h +++ b/libxfs/xfs_rtrmap_btree.h @@ -198,4 +198,7 @@ int xfs_rtrmapbt_create(struct xfs_rtgroup *rtg, struct xfs_inode *ip, int xfs_rtrmapbt_init_rtsb(struct xfs_mount *mp, struct xfs_rtgroup *rtg, struct xfs_trans *tp); +unsigned long long xfs_rtrmapbt_calc_size(struct xfs_mount *mp, + unsigned long long len); + #endif /* __XFS_RTRMAP_BTREE_H__ */