aboutsummaryrefslogtreecommitdiffstats
path: root/libxfs/xfs_rtbitmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'libxfs/xfs_rtbitmap.h')
-rw-r--r--libxfs/xfs_rtbitmap.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libxfs/xfs_rtbitmap.h b/libxfs/xfs_rtbitmap.h
index ff901bf3d1..ecf5645dd6 100644
--- a/libxfs/xfs_rtbitmap.h
+++ b/libxfs/xfs_rtbitmap.h
@@ -84,6 +84,24 @@ xfs_rtb_to_rtxup(
return rtbno;
}
+/* Round this rtblock up to the nearest rt extent size. */
+static inline xfs_rtblock_t
+xfs_rtb_roundup_rtx(
+ struct xfs_mount *mp,
+ xfs_rtblock_t rtbno)
+{
+ return roundup_64(rtbno, mp->m_sb.sb_rextsize);
+}
+
+/* Round this rtblock down to the nearest rt extent size. */
+static inline xfs_rtblock_t
+xfs_rtb_rounddown_rtx(
+ struct xfs_mount *mp,
+ xfs_rtblock_t rtbno)
+{
+ return rounddown_64(rtbno, mp->m_sb.sb_rextsize);
+}
+
/*
* Functions for walking free space rtextents in the realtime bitmap.
*/