]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
fixup xfs-rtg-cleanups
authorChristoph Hellwig <hch@lst.de>
Thu, 10 Oct 2024 11:16:43 +0000 (13:16 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 10 Oct 2024 15:01:19 +0000 (17:01 +0200)
open code xfs_rgbno_to_daddr

libxfs/init.c

index 7a0adb4108129704aaa882be21f5b156e1755d52..4975e94592d7d46363dfa3c6e0b3fc54d65387f9 100644 (file)
@@ -672,6 +672,7 @@ check_many_rtgroups(
        struct xfs_mount        *mp,
        struct xfs_sb           *sbp)
 {
+       xfs_rtblock_t           rtbno;
        struct xfs_buf          *bp;
        int                     error;
 
@@ -685,9 +686,11 @@ check_many_rtgroups(
                return true;
        }
 
-       error = libxfs_buf_read(mp->m_rtdev,
-                       xfs_rgbno_to_daddr(mp, sbp->sb_rgcount - 1, 0), 1, 0,
-                       &bp, NULL);
+       rtbno = ((xfs_rtblock_t)(sbp->sb_rgcount - 1)) <<
+                       mp->m_groups[XG_TYPE_RTG].blklog;
+
+       error = libxfs_buf_read(mp->m_rtdev, xfs_rtb_to_daddr(mp, rtbno),
+                       1, 0, &bp, NULL);
        if (!error) {
                libxfs_buf_relse(bp);
                return true;