]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xfs: rename xfs_verify_rtext to xfs_verify_rtbext
authorDarrick J. Wong <djwong@kernel.org>
Mon, 16 Oct 2023 16:31:22 +0000 (09:31 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 17 Oct 2023 23:24:22 +0000 (16:24 -0700)
This helper function validates that a range of *blocks* in the
realtime section is completely contained within the realtime section.
It does /not/ validate ranges of *rtextents*.  Rename the function to
avoid suggesting that it does, and change the type of the @len parameter
since xfs_rtblock_t is a position unit, not a length unit.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_types.c
fs/xfs/libxfs/xfs_types.h
fs/xfs/scrub/bmap.c
fs/xfs/scrub/rtbitmap.c
fs/xfs/scrub/rtsummary.c

index a47da8d3d1bce4847dcc11fcea6ec9abba40b000..4e7de4f2fd7ac5a5ae1c2053ee1b71051c3c0977 100644 (file)
@@ -6196,8 +6196,8 @@ xfs_bmap_validate_extent(
                return __this_address;
 
        if (XFS_IS_REALTIME_INODE(ip) && whichfork == XFS_DATA_FORK) {
-               if (!xfs_verify_rtext(mp, irec->br_startblock,
-                                         irec->br_blockcount))
+               if (!xfs_verify_rtbext(mp, irec->br_startblock,
+                                          irec->br_blockcount))
                        return __this_address;
        } else {
                if (!xfs_verify_fsbext(mp, irec->br_startblock,
index 5c27659347329bc4b6fea4c88b9bc642cbe929cc..c299b16c9365fab61b98e13bebc38607d9768f87 100644 (file)
@@ -148,10 +148,10 @@ xfs_verify_rtbno(
 
 /* Verify that a realtime device extent is fully contained inside the volume. */
 bool
-xfs_verify_rtext(
+xfs_verify_rtbext(
        struct xfs_mount        *mp,
        xfs_rtblock_t           rtbno,
-       xfs_rtblock_t           len)
+       xfs_filblks_t           len)
 {
        if (rtbno + len <= rtbno)
                return false;
index 9af98a97523946d897bbc2d80bab5bbc94db2a20..9e45f13f6d70959698d46e289894f71989c49f92 100644 (file)
@@ -231,8 +231,8 @@ bool xfs_verify_ino(struct xfs_mount *mp, xfs_ino_t ino);
 bool xfs_internal_inum(struct xfs_mount *mp, xfs_ino_t ino);
 bool xfs_verify_dir_ino(struct xfs_mount *mp, xfs_ino_t ino);
 bool xfs_verify_rtbno(struct xfs_mount *mp, xfs_rtblock_t rtbno);
-bool xfs_verify_rtext(struct xfs_mount *mp, xfs_rtblock_t rtbno,
-               xfs_rtblock_t len);
+bool xfs_verify_rtbext(struct xfs_mount *mp, xfs_rtblock_t rtbno,
+               xfs_filblks_t len);
 bool xfs_verify_icount(struct xfs_mount *mp, unsigned long long icount);
 bool xfs_verify_dablk(struct xfs_mount *mp, xfs_fileoff_t off);
 void xfs_icount_range(struct xfs_mount *mp, unsigned long long *min,
index 75588915572e92c3b99c0d89b033ae590086fc18..06d8c1996a3389e4396b3c354a3f88ab76c94d81 100644 (file)
@@ -410,7 +410,7 @@ xchk_bmap_iextent(
 
        /* Make sure the extent points to a valid place. */
        if (info->is_rt &&
-           !xfs_verify_rtext(mp, irec->br_startblock, irec->br_blockcount))
+           !xfs_verify_rtbext(mp, irec->br_startblock, irec->br_blockcount))
                xchk_fblock_set_corrupt(info->sc, info->whichfork,
                                irec->br_startoff);
        if (!info->is_rt &&
index 71d3e8b858446985cd96361369645a5056ae1846..8c8a611cc6d42306ae82d466b4949049f2fd2219 100644 (file)
@@ -48,12 +48,12 @@ xchk_rtbitmap_rec(
 {
        struct xfs_scrub        *sc = priv;
        xfs_rtblock_t           startblock;
-       xfs_rtblock_t           blockcount;
+       xfs_filblks_t           blockcount;
 
        startblock = rec->ar_startext * mp->m_sb.sb_rextsize;
        blockcount = rec->ar_extcount * mp->m_sb.sb_rextsize;
 
-       if (!xfs_verify_rtext(mp, startblock, blockcount))
+       if (!xfs_verify_rtbext(mp, startblock, blockcount))
                xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0);
        return 0;
 }
index f4635a920470e1f944ea2c303852a462ef3ebbeb..d998f0c378a49f437c99cf86e13e9b78f3dff00d 100644 (file)
@@ -137,7 +137,7 @@ xchk_rtsum_record_free(
        rtbno = rec->ar_startext * mp->m_sb.sb_rextsize;
        rtlen = rec->ar_extcount * mp->m_sb.sb_rextsize;
 
-       if (!xfs_verify_rtext(mp, rtbno, rtlen)) {
+       if (!xfs_verify_rtbext(mp, rtbno, rtlen)) {
                xchk_ino_xref_set_corrupt(sc, mp->m_rbmip->i_ino);
                return -EFSCORRUPTED;
        }