Skip to content

Commit 3d2b6d0

Browse files
author
Darrick J. Wong
committed
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: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent f29c3e7 commit 3d2b6d0

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

fs/xfs/libxfs/xfs_bmap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6196,8 +6196,8 @@ xfs_bmap_validate_extent(
61966196
return __this_address;
61976197

61986198
if (XFS_IS_REALTIME_INODE(ip) && whichfork == XFS_DATA_FORK) {
6199-
if (!xfs_verify_rtext(mp, irec->br_startblock,
6200-
irec->br_blockcount))
6199+
if (!xfs_verify_rtbext(mp, irec->br_startblock,
6200+
irec->br_blockcount))
62016201
return __this_address;
62026202
} else {
62036203
if (!xfs_verify_fsbext(mp, irec->br_startblock,

fs/xfs/libxfs/xfs_types.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ xfs_verify_rtbno(
148148

149149
/* Verify that a realtime device extent is fully contained inside the volume. */
150150
bool
151-
xfs_verify_rtext(
151+
xfs_verify_rtbext(
152152
struct xfs_mount *mp,
153153
xfs_rtblock_t rtbno,
154-
xfs_rtblock_t len)
154+
xfs_filblks_t len)
155155
{
156156
if (rtbno + len <= rtbno)
157157
return false;

fs/xfs/libxfs/xfs_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ bool xfs_verify_ino(struct xfs_mount *mp, xfs_ino_t ino);
231231
bool xfs_internal_inum(struct xfs_mount *mp, xfs_ino_t ino);
232232
bool xfs_verify_dir_ino(struct xfs_mount *mp, xfs_ino_t ino);
233233
bool xfs_verify_rtbno(struct xfs_mount *mp, xfs_rtblock_t rtbno);
234-
bool xfs_verify_rtext(struct xfs_mount *mp, xfs_rtblock_t rtbno,
235-
xfs_rtblock_t len);
234+
bool xfs_verify_rtbext(struct xfs_mount *mp, xfs_rtblock_t rtbno,
235+
xfs_filblks_t len);
236236
bool xfs_verify_icount(struct xfs_mount *mp, unsigned long long icount);
237237
bool xfs_verify_dablk(struct xfs_mount *mp, xfs_fileoff_t off);
238238
void xfs_icount_range(struct xfs_mount *mp, unsigned long long *min,

fs/xfs/scrub/bmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ xchk_bmap_iextent(
410410

411411
/* Make sure the extent points to a valid place. */
412412
if (info->is_rt &&
413-
!xfs_verify_rtext(mp, irec->br_startblock, irec->br_blockcount))
413+
!xfs_verify_rtbext(mp, irec->br_startblock, irec->br_blockcount))
414414
xchk_fblock_set_corrupt(info->sc, info->whichfork,
415415
irec->br_startoff);
416416
if (!info->is_rt &&

fs/xfs/scrub/rtbitmap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ xchk_rtbitmap_rec(
4848
{
4949
struct xfs_scrub *sc = priv;
5050
xfs_rtblock_t startblock;
51-
xfs_rtblock_t blockcount;
51+
xfs_filblks_t blockcount;
5252

5353
startblock = rec->ar_startext * mp->m_sb.sb_rextsize;
5454
blockcount = rec->ar_extcount * mp->m_sb.sb_rextsize;
5555

56-
if (!xfs_verify_rtext(mp, startblock, blockcount))
56+
if (!xfs_verify_rtbext(mp, startblock, blockcount))
5757
xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0);
5858
return 0;
5959
}

fs/xfs/scrub/rtsummary.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ xchk_rtsum_record_free(
137137
rtbno = rec->ar_startext * mp->m_sb.sb_rextsize;
138138
rtlen = rec->ar_extcount * mp->m_sb.sb_rextsize;
139139

140-
if (!xfs_verify_rtext(mp, rtbno, rtlen)) {
140+
if (!xfs_verify_rtbext(mp, rtbno, rtlen)) {
141141
xchk_ino_xref_set_corrupt(sc, mp->m_rbmip->i_ino);
142142
return -EFSCORRUPTED;
143143
}

0 commit comments

Comments
 (0)