From: Darrick J. Wong <djwong@xxxxxxxxxx> Convert the repair program to use the new realtime extent types and helper functions instead of open-coding them. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- mkfs/proto.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mkfs/proto.c b/mkfs/proto.c index 484b5deced8..21fe2c7f972 100644 --- a/mkfs/proto.c +++ b/mkfs/proto.c @@ -913,21 +913,22 @@ rtfreesp_init( struct xfs_mount *mp) { struct xfs_trans *tp; - xfs_fileoff_t bno; - xfs_fileoff_t ebno; + xfs_rtxnum_t rtx; + xfs_rtxnum_t ertx; int error; - for (bno = 0; bno < mp->m_sb.sb_rextents; bno = ebno) { + for (rtx = 0; rtx < mp->m_sb.sb_rextents; rtx = ertx) { error = -libxfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp); if (error) res_failed(error); libxfs_trans_ijoin(tp, mp->m_rbmip, 0); - ebno = XFS_RTMIN(mp->m_sb.sb_rextents, - bno + NBBY * mp->m_sb.sb_blocksize); + ertx = XFS_RTMIN(mp->m_sb.sb_rextents, + rtx + NBBY * mp->m_sb.sb_blocksize); - error = -libxfs_rtfree_extent(tp, bno, (xfs_extlen_t)(ebno-bno)); + error = -libxfs_rtfree_extent(tp, rtx, + (xfs_rtxlen_t)(ertx - rtx)); if (error) { fail(_("Error initializing the realtime space"), error);