]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: online repair of realtime bitmaps for a realtime group
authorDarrick J. Wong <djwong@kernel.org>
Mon, 23 Sep 2024 20:42:16 +0000 (13:42 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 9 Oct 2024 23:29:18 +0000 (16:29 -0700)
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>
libxfs/xfs_rtbitmap.h

index 26f4e3d116f82887bc329a4034e6bfa611540685..de5b2b6ad2ab1458ab939d35009c986832e29e60 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(