Commit add3cdda authored by Darrick J. Wong's avatar Darrick J. Wong

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: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 90d98a6a
...@@ -1142,8 +1142,6 @@ static inline bool xfs_dinode_has_large_extent_counts( ...@@ -1142,8 +1142,6 @@ static inline bool xfs_dinode_has_large_extent_counts(
#define XFS_BLOCKSIZE(mp) ((mp)->m_sb.sb_blocksize) #define XFS_BLOCKSIZE(mp) ((mp)->m_sb.sb_blocksize)
#define XFS_BLOCKMASK(mp) ((mp)->m_blockmask) #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. * RT Summary and bit manipulation macros.
......
...@@ -174,7 +174,7 @@ xfs_rtfind_back( ...@@ -174,7 +174,7 @@ xfs_rtfind_back(
return error; return error;
} }
bufp = bp->b_addr; bufp = bp->b_addr;
word = XFS_BLOCKWMASK(mp); word = mp->m_blockwsize - 1;
b = &bufp[word]; b = &bufp[word];
} else { } else {
/* /*
...@@ -220,7 +220,7 @@ xfs_rtfind_back( ...@@ -220,7 +220,7 @@ xfs_rtfind_back(
return error; return error;
} }
bufp = bp->b_addr; bufp = bp->b_addr;
word = XFS_BLOCKWMASK(mp); word = mp->m_blockwsize - 1;
b = &bufp[word]; b = &bufp[word];
} else { } else {
/* /*
...@@ -338,7 +338,7 @@ xfs_rtfind_forw( ...@@ -338,7 +338,7 @@ xfs_rtfind_forw(
* Go on to next block if that's where the next word is * Go on to next block if that's where the next word is
* and we need the next word. * 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. * If done with this block, get the previous one.
*/ */
...@@ -383,7 +383,7 @@ xfs_rtfind_forw( ...@@ -383,7 +383,7 @@ xfs_rtfind_forw(
* Go on to next block if that's where the next word is * Go on to next block if that's where the next word is
* and we need the next word. * 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. * If done with this block, get the next one.
*/ */
...@@ -593,7 +593,7 @@ xfs_rtmodify_range( ...@@ -593,7 +593,7 @@ xfs_rtmodify_range(
* Go on to the next block if that's where the next word is * Go on to the next block if that's where the next word is
* and we need the next word. * 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. * Log the changed part of this block.
* Get the next one. * Get the next one.
...@@ -633,7 +633,7 @@ xfs_rtmodify_range( ...@@ -633,7 +633,7 @@ xfs_rtmodify_range(
* Go on to the next block if that's where the next word is * Go on to the next block if that's where the next word is
* and we need the next word. * 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. * Log the changed part of this block.
* Get the next one. * Get the next one.
...@@ -836,7 +836,7 @@ xfs_rtcheck_range( ...@@ -836,7 +836,7 @@ xfs_rtcheck_range(
* Go on to next block if that's where the next word is * Go on to next block if that's where the next word is
* and we need the next word. * 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. * If done with this block, get the next one.
*/ */
...@@ -882,7 +882,7 @@ xfs_rtcheck_range( ...@@ -882,7 +882,7 @@ xfs_rtcheck_range(
* Go on to next block if that's where the next word is * Go on to next block if that's where the next word is
* and we need the next word. * 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. * If done with this block, get the next one.
*/ */
......
...@@ -146,7 +146,7 @@ xfs_rtx_to_rbmword( ...@@ -146,7 +146,7 @@ xfs_rtx_to_rbmword(
struct xfs_mount *mp, struct xfs_mount *mp,
xfs_rtxnum_t rtx) 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. */ /* Convert a file block offset in the rt bitmap file to an rt extent number. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment