diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-10-16 19:47:34 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-10-18 03:45:38 +0300 |
commit | 097b4b7b64ef67a4703b89fd4064480b61557fd5 (patch) | |
tree | ef89174ec6a976be4b31c180ffdab24809ac71ed /fs/xfs/libxfs/xfs_format.h | |
parent | a9948626849c2c65dfd201b5e9d855e62937de61 (diff) | |
download | linux-097b4b7b64ef67a4703b89fd4064480b61557fd5.tar.xz |
xfs: convert rt summary macros to helpers
Convert the realtime summary file macros to helper functions so that we
can improve type checking.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_format.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_format.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h index ac6dd102342d..d48e3a395bd9 100644 --- a/fs/xfs/libxfs/xfs_format.h +++ b/fs/xfs/libxfs/xfs_format.h @@ -1144,15 +1144,8 @@ static inline bool xfs_dinode_has_large_extent_counts( #define XFS_BLOCKMASK(mp) ((mp)->m_blockmask) /* - * RT Summary and bit manipulation macros. + * RT bit manipulation macros. */ -#define XFS_SUMOFFS(mp,ls,bb) ((int)((ls) * (mp)->m_sb.sb_rbmblocks + (bb))) -#define XFS_SUMOFFSTOBLOCK(mp,s) \ - (((s) * (uint)sizeof(xfs_suminfo_t)) >> (mp)->m_sb.sb_blocklog) -#define XFS_SUMPTR(mp,bp,so) \ - ((xfs_suminfo_t *)((bp)->b_addr + \ - (((so) * (uint)sizeof(xfs_suminfo_t)) & XFS_BLOCKMASK(mp)))) - #define XFS_RTMIN(a,b) ((a) < (b) ? (a) : (b)) #define XFS_RTMAX(a,b) ((a) > (b) ? (a) : (b)) |