struct xfs_mount *mp,
xfs_rtblock_t rtbno)
{
- uint64_t __rgbno = __xfs_rtb_to_rgbno(mp, rtbno);
-
+ rtbno &= mp->m_groups[XG_TYPE_RTG].blkmask;
if (likely(mp->m_rtxblklog >= 0))
- return __rgbno >> mp->m_rtxblklog;
- return div_u64(__rgbno, mp->m_sb.sb_rextsize);
+ return rtbno >> mp->m_rtxblklog;
+ return div_u64(rtbno, mp->m_sb.sb_rextsize);
}
/* Return the offset of a rtgroup block number within an rt extent. */
struct xfs_mount *mp,
xfs_rtblock_t rtbno)
{
- uint64_t __rgbno = __xfs_rtb_to_rgbno(mp, rtbno);
-
+ rtbno &= mp->m_groups[XG_TYPE_RTG].blkmask;
if (likely(mp->m_rtxblklog >= 0))
- return __rgbno & mp->m_rtxblkmask;
-
- return do_div(__rgbno, mp->m_sb.sb_rextsize);
+ return rtbno & mp->m_rtxblkmask;
+ return do_div(rtbno, mp->m_sb.sb_rextsize);
}
/* Round this rtblock up to the nearest rt extent size. */
return xfs_fsb_to_gno(mp, rtbno, XG_TYPE_RTG);
}
-static inline uint64_t
-__xfs_rtb_to_rgbno(
- struct xfs_mount *mp,
- xfs_rtblock_t rtbno)
-{
- if (!xfs_has_rtgroups(mp))
- return rtbno;
-
- return rtbno & mp->m_groups[XG_TYPE_RTG].blkmask;
-}
-
static inline xfs_rgblock_t
xfs_rtb_to_rgbno(
struct xfs_mount *mp,
xfs_rtblock_t rtbno)
{
return xfs_rgbno_to_daddr(mp, xfs_rtb_to_rgno(mp, rtbno),
- __xfs_rtb_to_rgbno(mp, rtbno));
+ rtbno & mp->m_groups[XG_TYPE_RTG].blkmask);
}
static inline xfs_rgnumber_t