]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: allow dquot rt block count to exceed rt blocks on reflink fs
authorDarrick J. Wong <djwong@kernel.org>
Thu, 15 Aug 2024 18:49:40 +0000 (11:49 -0700)
committerChristoph Hellwig <hch@lst.de>
Sun, 22 Sep 2024 08:48:30 +0000 (10:48 +0200)
Update the quota scrubber to allow dquots where the realtime block count
exceeds the block count of the rt volume if reflink is enabled.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/scrub/quota.c

index 183d531875eae505c42da746bbe596f511d4f202..58d6d4ed2853b35c8ca4b1ec23b1890bbd700896 100644 (file)
@@ -212,12 +212,18 @@ xchk_quota_item(
                if (mp->m_sb.sb_dblocks < dq->q_blk.count)
                        xchk_fblock_set_warning(sc, XFS_DATA_FORK,
                                        offset);
+               if (mp->m_sb.sb_rblocks < dq->q_rtb.count)
+                       xchk_fblock_set_warning(sc, XFS_DATA_FORK,
+                                       offset);
        } else {
                if (mp->m_sb.sb_dblocks < dq->q_blk.count)
                        xchk_fblock_set_corrupt(sc, XFS_DATA_FORK,
                                        offset);
+               if (mp->m_sb.sb_rblocks < dq->q_rtb.count)
+                       xchk_fblock_set_corrupt(sc, XFS_DATA_FORK,
+                                       offset);
        }
-       if (dq->q_ino.count > fs_icount || dq->q_rtb.count > mp->m_sb.sb_rblocks)
+       if (dq->q_ino.count > fs_icount)
                xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, offset);
 
        /*