]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: don't update sb_frextents in xfs_trans_unreserve_and_mod_sb
authorChristoph Hellwig <hch@lst.de>
Sat, 28 Sep 2024 09:52:35 +0000 (11:52 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 2 Oct 2024 07:03:34 +0000 (09:03 +0200)
For RTG file systens, sb_frextents is always a lazy counter and doesn't
need to be updated here.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_trans.c

index bc239bfc99d2bdc1f0eab693ee3c123163b85dc5..a0000f613fb101557537cab0373e8a91e34cbcda 100644 (file)
@@ -681,14 +681,10 @@ xfs_trans_unreserve_and_mod_sb(
        mp->m_sb.sb_icount += idelta;
        mp->m_sb.sb_ifree += ifreedelta;
        /*
-        * Do not touch sb_frextents here because we are dealing with incore
-        * reservation.  sb_frextents is not part of the lazy sb counters so it
-        * must be consistent with the ondisk rtbitmap and must never include
-        * incore reservations.  sb_frextents was added to the lazy sb counters
-        * when the realtime groups feature was introduced.
+        * Do not touch sb_frextents here because it is handled in
+        * xfs_trans_apply_sb_deltas for file systems where it isn't a lazy
+        * counter anyway.
         */
-       if (xfs_has_rtgroups(mp))
-               mp->m_sb.sb_frextents += rtxdelta;
        mp->m_sb.sb_dblocks += tp->t_dblocks_delta;
        mp->m_sb.sb_agcount += tp->t_agcount_delta;
        mp->m_sb.sb_imax_pct += tp->t_imaxpct_delta;