]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: online repair of realtime bitmaps for a realtime group
authorDarrick J. Wong <djwong@kernel.org>
Mon, 24 Feb 2025 18:21:50 +0000 (10:21 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 25 Feb 2025 17:15:58 +0000 (09:15 -0800)
Source kernel commit: 8defee8dff2b202702cdf33f6d8577adf9ad3e82

For a given rt group, regenerate the bitmap contents from the group's
realtime rmap btree.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_rtbitmap.h

index 16563a44bd138a4f32793498dc46bc6b364226f2..22e5d9cd95f47c2a384858def86202a296563867 100644 (file)
@@ -135,6 +135,15 @@ xfs_rtb_to_rtx(
        return div_u64(rtbno, mp->m_sb.sb_rextsize);
 }
 
+/* Return the offset of a rtgroup block number within an rt extent. */
+static inline xfs_extlen_t
+xfs_rgbno_to_rtxoff(
+       struct xfs_mount        *mp,
+       xfs_rgblock_t           rgbno)
+{
+       return rgbno % mp->m_sb.sb_rextsize;
+}
+
 /* Return the offset of an rt block number within an rt extent. */
 static inline xfs_extlen_t
 xfs_rtb_to_rtxoff(