From: Darrick J. Wong <djwong@xxxxxxxxxx> Historically, the quota warning counter was never incremented on a softlimit violation, and hence was never enforced. Now that the counter works, the default of 5 warnings is getting enforced, which is a breakage that people aren't used to. In the interest of not introducing new fail to things that used to work, make the default warning limit of zero, and make zero mean there is no limit. Sorta-fixes: 4b8628d57b72 ("xfs: actually bump warning counts when we send warnings") Reported-by: Eric Sandeen <sandeen@xxxxxxxxxxx> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- fs/xfs/xfs_qm.h | 11 ++++++++--- fs/xfs/xfs_trans_dquot.c | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_qm.h b/fs/xfs/xfs_qm.h index 5bb12717ea28..2013f6100067 100644 --- a/fs/xfs/xfs_qm.h +++ b/fs/xfs/xfs_qm.h @@ -134,9 +134,14 @@ struct xfs_dquot_acct { #define XFS_QM_RTBTIMELIMIT (7 * 24*60*60) /* 1 week */ #define XFS_QM_ITIMELIMIT (7 * 24*60*60) /* 1 week */ -#define XFS_QM_BWARNLIMIT 5 -#define XFS_QM_IWARNLIMIT 5 -#define XFS_QM_RTBWARNLIMIT 5 +/* + * Histerically, the quota warning counter never incremented and hence was + * never enforced. Now that the counter works, we set a default warning limit + * of zero, which means there is no limit. + */ +#define XFS_QM_BWARNLIMIT 0 +#define XFS_QM_IWARNLIMIT 0 +#define XFS_QM_RTBWARNLIMIT 0 extern void xfs_qm_destroy_quotainfo(struct xfs_mount *); diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c index 9ba7e6b9bed3..32da74cf0768 100644 --- a/fs/xfs/xfs_trans_dquot.c +++ b/fs/xfs/xfs_trans_dquot.c @@ -598,7 +598,8 @@ xfs_dqresv_check( time64_t now = ktime_get_real_seconds(); if ((res->timer != 0 && now > res->timer) || - (res->warnings != 0 && res->warnings >= qlim->warn)) { + (res->warnings != 0 && qlim->warn != 0 && + res->warnings >= qlim->warn)) { *fatal = true; return QUOTA_NL_ISOFTLONGWARN; }