]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: remove XFS_BLOCKWSIZE and XFS_BLOCKWMASK macros
authorDarrick J. Wong <djwong@kernel.org>
Mon, 16 Oct 2023 16:46:08 +0000 (09:46 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 18 Oct 2023 00:45:37 +0000 (17:45 -0700)
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>
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_rtbitmap.c
fs/xfs/libxfs/xfs_rtbitmap.h

index 0e2ee820240259b600b1a082c2f547fc585b7255..ac6dd102342d2a347f62f1f2036582c39026d77b 100644 (file)
@@ -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.
index 9ef336d22861cf8e717296bd59bf80d4b55a80f7..63caad17dd8888d91914bf4e92cbe362bf9d66c2 100644 (file)
@@ -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.
                         */
index 5c4325702cb104c10bcfdc18ae9dc83dd12e85c8..a382b38c6c30dcc6350ae1b1025842f28cb433e8 100644 (file)
@@ -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. */