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

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