From: Bill O'Donnell <billodo@redhat.com>
To: linux-xfs@vger.kernel.org
Cc: sandeen@sandeen.net, darrick.wong@oracle.com
Subject: [PATCH 2/3] xfs_quota: display warning limits when printing quota type information
Date: Wed, 15 Jul 2020 15:12:52 -0500 [thread overview]
Message-ID: <20200715201253.171356-3-billodo@redhat.com> (raw)
In-Reply-To: <20200715201253.171356-1-billodo@redhat.com>
From: "Darrick J. Wong" <darrick.wong@oracle.com>
We should dump the default warning limits when we're printing quota
information.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
quota/state.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/quota/state.c b/quota/state.c
index 7a595fc6..1627181d 100644
--- a/quota/state.c
+++ b/quota/state.c
@@ -130,6 +130,16 @@ state_timelimit(
time_to_string(timelimit, VERBOSE_FLAG | ABSOLUTE_FLAG));
}
+static void
+state_warnlimit(
+ FILE *fp,
+ uint form,
+ uint16_t warnlimit)
+{
+ fprintf(fp, _("%s max warnings: %u\n"),
+ form_to_string(form), warnlimit);
+}
+
/*
* fs_quota_stat holds a subset of fs_quota_statv; this copies
* the smaller into the larger, leaving any not-present fields
@@ -218,7 +228,11 @@ state_quotafile_mount(
sv.qs_flags & XFS_QUOTA_PDQ_ENFD);
state_timelimit(fp, XFS_BLOCK_QUOTA, sv.qs_btimelimit);
+ state_warnlimit(fp, XFS_BLOCK_QUOTA, sv.qs_bwarnlimit);
+
state_timelimit(fp, XFS_INODE_QUOTA, sv.qs_itimelimit);
+ state_warnlimit(fp, XFS_INODE_QUOTA, sv.qs_iwarnlimit);
+
state_timelimit(fp, XFS_RTBLOCK_QUOTA, sv.qs_rtbtimelimit);
}
--
2.26.2
next prev parent reply other threads:[~2020-07-15 20:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-15 20:12 [PATCH 0/3] xfsprogs: xfs_quota error message and state reporting improvement Bill O'Donnell
2020-07-15 20:12 ` [PATCH 1/3] xfsprogs: xfs_quota command error message improvement Bill O'Donnell
2020-07-17 21:10 ` Darrick J. Wong
2020-07-21 15:04 ` Christoph Hellwig
2020-07-21 15:55 ` Bill O'Donnell
2020-07-15 20:12 ` Bill O'Donnell [this message]
2020-07-15 20:12 ` [PATCH 3/3] xfsprogs: xfs_quota state command should report ugp grace times Bill O'Donnell
2020-07-15 20:33 ` Eric Sandeen
2020-07-15 20:44 ` Bill O'Donnell
2020-07-17 20:43 ` [PATCH v2 " Bill O'Donnell
2020-07-17 21:13 ` Darrick J. Wong
2020-07-21 15:05 ` Christoph Hellwig
2020-07-30 17:46 ` [PATCH 0/3] xfsprogs: xfs_quota error message and state reporting improvement Eric Sandeen
2020-07-30 17:52 ` Bill O'Donnell
2020-07-30 18:30 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200715201253.171356-3-billodo@redhat.com \
--to=billodo@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).