]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove support for disabling quota accounting on a mounted file system
authorChristoph Hellwig <hch@lst.de>
Mon, 31 Jan 2022 20:25:47 +0000 (15:25 -0500)
committerEric Sandeen <sandeen@redhat.com>
Mon, 31 Jan 2022 20:25:47 +0000 (15:25 -0500)
Source kernel commit: 40b52225e58cd3adf9358146b4b39dccfbfe5892

Disabling quota accounting is hairy, racy code with all kinds of pitfalls.
And it has a very strange mind set, as quota accounting (unlike
enforcement) really is a propery of the on-disk format.  There is no good
use case for supporting this.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_trans_resv.c
libxfs/xfs_trans_resv.h

index 9ce7d8f99f3f303af1c7f4f32441404d78f89fa5..fa5edb8722b90c51c27035c4834bf8204a8e5cad 100644 (file)
@@ -797,29 +797,6 @@ xfs_calc_qm_dqalloc_reservation(
                        XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB) - 1);
 }
 
-/*
- * Turning off quotas.
- *    the quota off logitems: sizeof(struct xfs_qoff_logitem) * 2
- *    the superblock for the quota flags: sector size
- */
-STATIC uint
-xfs_calc_qm_quotaoff_reservation(
-       struct xfs_mount        *mp)
-{
-       return sizeof(struct xfs_qoff_logitem) * 2 +
-               xfs_calc_buf_res(1, mp->m_sb.sb_sectsize);
-}
-
-/*
- * End of turning off quotas.
- *    the quota off logitems: sizeof(struct xfs_qoff_logitem) * 2
- */
-STATIC uint
-xfs_calc_qm_quotaoff_end_reservation(void)
-{
-       return sizeof(struct xfs_qoff_logitem) * 2;
-}
-
 /*
  * Syncing the incore super block changes to disk.
  *     the super block to reflect the changes: sector size
@@ -922,13 +899,6 @@ xfs_trans_resv_calc(
        resp->tr_qm_setqlim.tr_logres = xfs_calc_qm_setqlim_reservation();
        resp->tr_qm_setqlim.tr_logcount = XFS_DEFAULT_LOG_COUNT;
 
-       resp->tr_qm_quotaoff.tr_logres = xfs_calc_qm_quotaoff_reservation(mp);
-       resp->tr_qm_quotaoff.tr_logcount = XFS_DEFAULT_LOG_COUNT;
-
-       resp->tr_qm_equotaoff.tr_logres =
-               xfs_calc_qm_quotaoff_end_reservation();
-       resp->tr_qm_equotaoff.tr_logcount = XFS_DEFAULT_LOG_COUNT;
-
        resp->tr_sb.tr_logres = xfs_calc_sb_reservation(mp);
        resp->tr_sb.tr_logcount = XFS_DEFAULT_LOG_COUNT;
 
index 7241ab28cf84fe32ee7f854264f472f03591a5eb..fc4e9b369a3ae6bac41417d1aaeb895366aff6e2 100644 (file)
@@ -46,8 +46,6 @@ struct xfs_trans_resv {
        struct xfs_trans_res    tr_growrtfree;  /* grow realtime freeing */
        struct xfs_trans_res    tr_qm_setqlim;  /* adjust quota limits */
        struct xfs_trans_res    tr_qm_dqalloc;  /* allocate quota on disk */
-       struct xfs_trans_res    tr_qm_quotaoff; /* turn quota off */
-       struct xfs_trans_res    tr_qm_equotaoff;/* end of turn quota off */
        struct xfs_trans_res    tr_sb;          /* modify superblock */
        struct xfs_trans_res    tr_fsyncts;     /* update timestamps on fsync */
 };