Blame SOURCES/xfsprogs-5.8.0-xfs_quota-display-warning-limits-when-printing-quota.patch

4bf432
From 387a96e12a937c1b2ee29a0f2c52245d6a283078 Mon Sep 17 00:00:00 2001
4bf432
From: "Darrick J. Wong" <darrick.wong@oracle.com>
4bf432
Date: Mon, 24 Aug 2020 13:23:32 -0400
4bf432
Subject: [PATCH] xfs_quota: display warning limits when printing quota type
4bf432
 information
4bf432
4bf432
We should dump the default warning limits when we're printing quota
4bf432
information.
4bf432
4bf432
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
4bf432
Reviewed-by: Christoph Hellwig <hch@lst.de>
4bf432
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
4bf432
---
4bf432
 quota/state.c | 14 ++++++++++++++
4bf432
 1 file changed, 14 insertions(+)
4bf432
4bf432
diff --git a/quota/state.c b/quota/state.c
4bf432
index 7a595fc6..1627181d 100644
4bf432
--- a/quota/state.c
4bf432
+++ b/quota/state.c
4bf432
@@ -130,6 +130,16 @@ state_timelimit(
4bf432
 		time_to_string(timelimit, VERBOSE_FLAG | ABSOLUTE_FLAG));
4bf432
 }
4bf432
 
4bf432
+static void
4bf432
+state_warnlimit(
4bf432
+	FILE		*fp,
4bf432
+	uint		form,
4bf432
+	uint16_t	warnlimit)
4bf432
+{
4bf432
+	fprintf(fp, _("%s max warnings: %u\n"),
4bf432
+		form_to_string(form), warnlimit);
4bf432
+}
4bf432
+
4bf432
 /*
4bf432
  * fs_quota_stat holds a subset of fs_quota_statv; this copies
4bf432
  * the smaller into the larger, leaving any not-present fields
4bf432
@@ -218,7 +228,11 @@ state_quotafile_mount(
4bf432
 				sv.qs_flags & XFS_QUOTA_PDQ_ENFD);
4bf432
 
4bf432
 	state_timelimit(fp, XFS_BLOCK_QUOTA, sv.qs_btimelimit);
4bf432
+	state_warnlimit(fp, XFS_BLOCK_QUOTA, sv.qs_bwarnlimit);
4bf432
+
4bf432
 	state_timelimit(fp, XFS_INODE_QUOTA, sv.qs_itimelimit);
4bf432
+	state_warnlimit(fp, XFS_INODE_QUOTA, sv.qs_iwarnlimit);
4bf432
+
4bf432
 	state_timelimit(fp, XFS_RTBLOCK_QUOTA, sv.qs_rtbtimelimit);
4bf432
 }
4bf432
 
4bf432
-- 
4bf432
2.31.1
4bf432