diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-10-16 09:46:08 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-10-17 17:45:37 -0700 |
commit | add3cddaea509071d01bf1d34df0d05db1a93a07 (patch) | |
tree | 7e3c3bc90190676a709453b5f46e155fdcbc1d41 /fs/xfs | |
parent | 90d98a6ada1da0f8797ff3f5adafd175dd8c0a81 (diff) |
xfs: remove XFS_BLOCKWSIZE and XFS_BLOCKWMASK macros
Remove these trivial macros since they're not even part of the ondisk
format.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/libxfs/xfs_format.h | 2 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_rtbitmap.c | 16 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_rtbitmap.h | 2 |
3 files changed, 9 insertions, 11 deletions
diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h index 0e2ee8202402..ac6dd102342d 100644 --- a/fs/xfs/libxfs/xfs_format.h +++ b/fs/xfs/libxfs/xfs_format.h @@ -1142,8 +1142,6 @@ static inline bool xfs_dinode_has_large_extent_counts( #define XFS_BLOCKSIZE(mp) ((mp)->m_sb.sb_blocksize) #define XFS_BLOCKMASK(mp) ((mp)->m_blockmask) -#define XFS_BLOCKWSIZE(mp) ((mp)->m_blockwsize) -#define XFS_BLOCKWMASK(mp) ((mp)->m_blockwmask) /* * RT Summary and bit manipulation macros. diff --git a/fs/xfs/libxfs/xfs_rtbitmap.c b/fs/xfs/libxfs/xfs_rtbitmap.c index 9ef336d22861..63caad17dd88 100644 --- a/fs/xfs/libxfs/xfs_rtbitmap.c +++ b/fs/xfs/libxfs/xfs_rtbitmap.c @@ -174,7 +174,7 @@ xfs_rtfind_back( return error; } bufp = bp->b_addr; - word = XFS_BLOCKWMASK(mp); + word = mp->m_blockwsize - 1; b = &bufp[word]; } else { /* @@ -220,7 +220,7 @@ xfs_rtfind_back( return error; } bufp = bp->b_addr; - word = XFS_BLOCKWMASK(mp); + word = mp->m_blockwsize - 1; b = &bufp[word]; } else { /* @@ -338,7 +338,7 @@ xfs_rtfind_forw( * Go on to next block if that's where the next word is * and we need the next word. */ - if (++word == XFS_BLOCKWSIZE(mp) && i < len) { + if (++word == mp->m_blockwsize && i < len) { /* * If done with this block, get the previous one. */ @@ -383,7 +383,7 @@ xfs_rtfind_forw( * Go on to next block if that's where the next word is * and we need the next word. */ - if (++word == XFS_BLOCKWSIZE(mp) && i < len) { + if (++word == mp->m_blockwsize && i < len) { /* * If done with this block, get the next one. */ @@ -593,7 +593,7 @@ xfs_rtmodify_range( * Go on to the next block if that's where the next word is * and we need the next word. */ - if (++word == XFS_BLOCKWSIZE(mp) && i < len) { + if (++word == mp->m_blockwsize && i < len) { /* * Log the changed part of this block. * Get the next one. @@ -633,7 +633,7 @@ xfs_rtmodify_range( * Go on to the next block if that's where the next word is * and we need the next word. */ - if (++word == XFS_BLOCKWSIZE(mp) && i < len) { + if (++word == mp->m_blockwsize && i < len) { /* * Log the changed part of this block. * Get the next one. @@ -836,7 +836,7 @@ xfs_rtcheck_range( * Go on to next block if that's where the next word is * and we need the next word. */ - if (++word == XFS_BLOCKWSIZE(mp) && i < len) { + if (++word == mp->m_blockwsize && i < len) { /* * If done with this block, get the next one. */ @@ -882,7 +882,7 @@ xfs_rtcheck_range( * Go on to next block if that's where the next word is * and we need the next word. */ - if (++word == XFS_BLOCKWSIZE(mp) && i < len) { + if (++word == mp->m_blockwsize && i < len) { /* * If done with this block, get the next one. */ diff --git a/fs/xfs/libxfs/xfs_rtbitmap.h b/fs/xfs/libxfs/xfs_rtbitmap.h index 5c4325702cb1..a382b38c6c30 100644 --- a/fs/xfs/libxfs/xfs_rtbitmap.h +++ b/fs/xfs/libxfs/xfs_rtbitmap.h @@ -146,7 +146,7 @@ xfs_rtx_to_rbmword( struct xfs_mount *mp, xfs_rtxnum_t rtx) { - return (rtx >> XFS_NBWORDLOG) & XFS_BLOCKWMASK(mp); + return (rtx >> XFS_NBWORDLOG) & (mp->m_blockwsize - 1); } /* Convert a file block offset in the rt bitmap file to an rt extent number. */ |