* [PATCH] xfs_quota: display warning limits when printing quota type information
@ 2020-07-09 16:11 Darrick J. Wong
2020-07-10 8:59 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2020-07-09 16:11 UTC (permalink / raw)
To: Bill O'Donnell, Eric Sandeen; +Cc: xfs
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>
---
quota/state.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/quota/state.c b/quota/state.c
index 8f9718f1..a90b0d9e 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);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs_quota: display warning limits when printing quota type information
2020-07-09 16:11 [PATCH] xfs_quota: display warning limits when printing quota type information Darrick J. Wong
@ 2020-07-10 8:59 ` Christoph Hellwig
2020-07-10 15:42 ` Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2020-07-10 8:59 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Bill O'Donnell, Eric Sandeen, xfs
On Thu, Jul 09, 2020 at 09:11:24AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> We should dump the default warning limits when we're printing quota
> information.
This looks sensible. Do we need any xfstests changes for thew new
output, though?
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs_quota: display warning limits when printing quota type information
2020-07-10 8:59 ` Christoph Hellwig
@ 2020-07-10 15:42 ` Darrick J. Wong
0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2020-07-10 15:42 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Bill O'Donnell, Eric Sandeen, xfs
On Fri, Jul 10, 2020 at 09:59:06AM +0100, Christoph Hellwig wrote:
> On Thu, Jul 09, 2020 at 09:11:24AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > We should dump the default warning limits when we're printing quota
> > information.
>
> This looks sensible. Do we need any xfstests changes for thew new
> output, though?
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Yep. I'll throw that series in at the end of the next round of the
quota refactoring.
--D
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-10 15:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 16:11 [PATCH] xfs_quota: display warning limits when printing quota type information Darrick J. Wong
2020-07-10 8:59 ` Christoph Hellwig
2020-07-10 15:42 ` Darrick J. Wong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.