aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-02-12 15:26:20 +0100
committerCarlos Maiolino <cem@kernel.org>2024-02-15 12:56:43 +0100
commit18b4102aed5e7c5581a285e0981791a70cec9cd1 (patch)
treef35de8ece24eba35b4ee7b97271f446cd3867ac2
parent75e15fbcbd0aab6d2b3bd7de6ddb0a38ea8ad1e6 (diff)
downloadxfsprogs-dev-18b4102aed5e7c5581a285e0981791a70cec9cd1.tar.gz
xfs: remove XFS_BLOCKWSIZE and XFS_BLOCKWMASK macros
Source kernel commit: add3cddaea509071d01bf1d34df0d05db1a93a07 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> Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r--libxfs/xfs_format.h2
-rw-r--r--libxfs/xfs_rtbitmap.c16
-rw-r--r--libxfs/xfs_rtbitmap.h2
3 files changed, 9 insertions, 11 deletions
diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h
index 0e2ee82024..ac6dd10234 100644
--- a/libxfs/xfs_format.h
+++ b/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/libxfs/xfs_rtbitmap.c b/libxfs/xfs_rtbitmap.c
index 540cb14818..6776e45c18 100644
--- a/libxfs/xfs_rtbitmap.c
+++ b/libxfs/xfs_rtbitmap.c
@@ -172,7 +172,7 @@ xfs_rtfind_back(
return error;
}
bufp = bp->b_addr;
- word = XFS_BLOCKWMASK(mp);
+ word = mp->m_blockwsize - 1;
b = &bufp[word];
} else {
/*
@@ -218,7 +218,7 @@ xfs_rtfind_back(
return error;
}
bufp = bp->b_addr;
- word = XFS_BLOCKWMASK(mp);
+ word = mp->m_blockwsize - 1;
b = &bufp[word];
} else {
/*
@@ -336,7 +336,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.
*/
@@ -381,7 +381,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.
*/
@@ -591,7 +591,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.
@@ -631,7 +631,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.
@@ -834,7 +834,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.
*/
@@ -880,7 +880,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/libxfs/xfs_rtbitmap.h b/libxfs/xfs_rtbitmap.h
index 5c4325702c..a382b38c6c 100644
--- a/libxfs/xfs_rtbitmap.h
+++ b/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. */