]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: don't flag quota rt block usage on rtreflink filesystems
authorDarrick J. Wong <djwong@kernel.org>
Mon, 23 Sep 2024 20:42:48 +0000 (13:42 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 9 Oct 2024 13:55:51 +0000 (15:55 +0200)
Quota space usage is allowed to exceed the size of the physical storage
when reflink is enabled.  Now that we have reflink for the realtime
volume, apply this same logic to the rtb repair logic.

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

index cd51f10f29209e3f711a48624ae0c13401f80e56..8f4c8d41f3083ac3a4b324ded7d1ffe5f5e303c6 100644 (file)
@@ -233,7 +233,7 @@ xrep_quota_item(
                rqi->need_quotacheck = true;
                dirty = true;
        }
-       if (dq->q_rtb.count > mp->m_sb.sb_rblocks) {
+       if (!xfs_has_reflink(mp) && dq->q_rtb.count > mp->m_sb.sb_rblocks) {
                dq->q_rtb.reserved -= dq->q_rtb.count;
                dq->q_rtb.reserved += mp->m_sb.sb_rblocks;
                dq->q_rtb.count = mp->m_sb.sb_rblocks;