Skip to content

Commit add3cdd

Browse files
author
Darrick J. Wong
committed
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>
1 parent 90d98a6 commit add3cdd

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

fs/xfs/libxfs/xfs_format.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,8 +1142,6 @@ static inline bool xfs_dinode_has_large_extent_counts(
11421142

11431143
#define XFS_BLOCKSIZE(mp) ((mp)->m_sb.sb_blocksize)
11441144
#define XFS_BLOCKMASK(mp) ((mp)->m_blockmask)
1145-
#define XFS_BLOCKWSIZE(mp) ((mp)->m_blockwsize)
1146-
#define XFS_BLOCKWMASK(mp) ((mp)->m_blockwmask)
11471145

11481146
/*
11491147
* RT Summary and bit manipulation macros.

fs/xfs/libxfs/xfs_rtbitmap.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ xfs_rtfind_back(
174174
return error;
175175
}
176176
bufp = bp->b_addr;
177-
word = XFS_BLOCKWMASK(mp);
177+
word = mp->m_blockwsize - 1;
178178
b = &bufp[word];
179179
} else {
180180
/*
@@ -220,7 +220,7 @@ xfs_rtfind_back(
220220
return error;
221221
}
222222
bufp = bp->b_addr;
223-
word = XFS_BLOCKWMASK(mp);
223+
word = mp->m_blockwsize - 1;
224224
b = &bufp[word];
225225
} else {
226226
/*
@@ -338,7 +338,7 @@ xfs_rtfind_forw(
338338
* Go on to next block if that's where the next word is
339339
* and we need the next word.
340340
*/
341-
if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
341+
if (++word == mp->m_blockwsize && i < len) {
342342
/*
343343
* If done with this block, get the previous one.
344344
*/
@@ -383,7 +383,7 @@ xfs_rtfind_forw(
383383
* Go on to next block if that's where the next word is
384384
* and we need the next word.
385385
*/
386-
if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
386+
if (++word == mp->m_blockwsize && i < len) {
387387
/*
388388
* If done with this block, get the next one.
389389
*/
@@ -593,7 +593,7 @@ xfs_rtmodify_range(
593593
* Go on to the next block if that's where the next word is
594594
* and we need the next word.
595595
*/
596-
if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
596+
if (++word == mp->m_blockwsize && i < len) {
597597
/*
598598
* Log the changed part of this block.
599599
* Get the next one.
@@ -633,7 +633,7 @@ xfs_rtmodify_range(
633633
* Go on to the next block if that's where the next word is
634634
* and we need the next word.
635635
*/
636-
if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
636+
if (++word == mp->m_blockwsize && i < len) {
637637
/*
638638
* Log the changed part of this block.
639639
* Get the next one.
@@ -836,7 +836,7 @@ xfs_rtcheck_range(
836836
* Go on to next block if that's where the next word is
837837
* and we need the next word.
838838
*/
839-
if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
839+
if (++word == mp->m_blockwsize && i < len) {
840840
/*
841841
* If done with this block, get the next one.
842842
*/
@@ -882,7 +882,7 @@ xfs_rtcheck_range(
882882
* Go on to next block if that's where the next word is
883883
* and we need the next word.
884884
*/
885-
if (++word == XFS_BLOCKWSIZE(mp) && i < len) {
885+
if (++word == mp->m_blockwsize && i < len) {
886886
/*
887887
* If done with this block, get the next one.
888888
*/

fs/xfs/libxfs/xfs_rtbitmap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ xfs_rtx_to_rbmword(
146146
struct xfs_mount *mp,
147147
xfs_rtxnum_t rtx)
148148
{
149-
return (rtx >> XFS_NBWORDLOG) & XFS_BLOCKWMASK(mp);
149+
return (rtx >> XFS_NBWORDLOG) & (mp->m_blockwsize - 1);
150150
}
151151

152152
/* Convert a file block offset in the rt bitmap file to an rt extent number. */

0 commit comments

Comments
 (0)