Commit 3d2b6d03 authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: rename xfs_verify_rtext to xfs_verify_rtbext

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: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent f29c3e74
...@@ -6196,8 +6196,8 @@ xfs_bmap_validate_extent( ...@@ -6196,8 +6196,8 @@ xfs_bmap_validate_extent(
return __this_address; return __this_address;
if (XFS_IS_REALTIME_INODE(ip) && whichfork == XFS_DATA_FORK) { if (XFS_IS_REALTIME_INODE(ip) && whichfork == XFS_DATA_FORK) {
if (!xfs_verify_rtext(mp, irec->br_startblock, if (!xfs_verify_rtbext(mp, irec->br_startblock,
irec->br_blockcount)) irec->br_blockcount))
return __this_address; return __this_address;
} else { } else {
if (!xfs_verify_fsbext(mp, irec->br_startblock, if (!xfs_verify_fsbext(mp, irec->br_startblock,
......
...@@ -148,10 +148,10 @@ xfs_verify_rtbno( ...@@ -148,10 +148,10 @@ xfs_verify_rtbno(
/* Verify that a realtime device extent is fully contained inside the volume. */ /* Verify that a realtime device extent is fully contained inside the volume. */
bool bool
xfs_verify_rtext( xfs_verify_rtbext(
struct xfs_mount *mp, struct xfs_mount *mp,
xfs_rtblock_t rtbno, xfs_rtblock_t rtbno,
xfs_rtblock_t len) xfs_filblks_t len)
{ {
if (rtbno + len <= rtbno) if (rtbno + len <= rtbno)
return false; return false;
......
...@@ -231,8 +231,8 @@ bool xfs_verify_ino(struct xfs_mount *mp, xfs_ino_t ino); ...@@ -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_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_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_rtbno(struct xfs_mount *mp, xfs_rtblock_t rtbno);
bool xfs_verify_rtext(struct xfs_mount *mp, xfs_rtblock_t rtbno, bool xfs_verify_rtbext(struct xfs_mount *mp, xfs_rtblock_t rtbno,
xfs_rtblock_t len); xfs_filblks_t len);
bool xfs_verify_icount(struct xfs_mount *mp, unsigned long long icount); bool xfs_verify_icount(struct xfs_mount *mp, unsigned long long icount);
bool xfs_verify_dablk(struct xfs_mount *mp, xfs_fileoff_t off); bool xfs_verify_dablk(struct xfs_mount *mp, xfs_fileoff_t off);
void xfs_icount_range(struct xfs_mount *mp, unsigned long long *min, void xfs_icount_range(struct xfs_mount *mp, unsigned long long *min,
......
...@@ -410,7 +410,7 @@ xchk_bmap_iextent( ...@@ -410,7 +410,7 @@ xchk_bmap_iextent(
/* Make sure the extent points to a valid place. */ /* Make sure the extent points to a valid place. */
if (info->is_rt && 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, xchk_fblock_set_corrupt(info->sc, info->whichfork,
irec->br_startoff); irec->br_startoff);
if (!info->is_rt && if (!info->is_rt &&
......
...@@ -48,12 +48,12 @@ xchk_rtbitmap_rec( ...@@ -48,12 +48,12 @@ xchk_rtbitmap_rec(
{ {
struct xfs_scrub *sc = priv; struct xfs_scrub *sc = priv;
xfs_rtblock_t startblock; xfs_rtblock_t startblock;
xfs_rtblock_t blockcount; xfs_filblks_t blockcount;
startblock = rec->ar_startext * mp->m_sb.sb_rextsize; startblock = rec->ar_startext * mp->m_sb.sb_rextsize;
blockcount = rec->ar_extcount * 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); xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0);
return 0; return 0;
} }
......
...@@ -137,7 +137,7 @@ xchk_rtsum_record_free( ...@@ -137,7 +137,7 @@ xchk_rtsum_record_free(
rtbno = rec->ar_startext * mp->m_sb.sb_rextsize; rtbno = rec->ar_startext * mp->m_sb.sb_rextsize;
rtlen = rec->ar_extcount * 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); xchk_ino_xref_set_corrupt(sc, mp->m_rbmip->i_ino);
return -EFSCORRUPTED; return -EFSCORRUPTED;
} }
......
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