From: Bill O'Donnell <billodo@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org, sandeen@redhat.com, darrick.wong@oracle.com
Subject: Re: [PATCH] xfsprogs: xfs_quota state command should report ugp grace times
Date: Fri, 10 Jul 2020 08:53:47 -0500 [thread overview]
Message-ID: <20200710135347.GA249437@redhat.com> (raw)
In-Reply-To: <20200710090042.GB30797@infradead.org>
On Fri, Jul 10, 2020 at 10:00:42AM +0100, Christoph Hellwig wrote:
> On Thu, Jul 09, 2020 at 04:26:57PM -0500, Bill O'Donnell wrote:
> > Since grace periods are now supported for three quota types (ugp),
> > modify xfs_quota state command to report times for all three.
>
> This looks like it'll clash with the patch that Darrick just sent..
>
> > + if (type & XFS_USER_QUOTA) {
> > + if (xfsquotactl(XFS_GETQSTATV, dev, XFS_USER_QUOTA,
> > + 0, (void *)&sv) < 0) {
> > + if (xfsquotactl(XFS_GETQSTAT, dev, XFS_USER_QUOTA,
> > + 0, (void *)&s) < 0) {
> > + if (flags & VERBOSE_FLAG)
> > + fprintf(fp,
> > + _("%s quota are not enabled on %s\n"),
> > + type_to_string(XFS_USER_QUOTA),
> > + dev);
> > + return;
> > + }
> > + state_stat_to_statv(&s, &sv);
> > }
> >
> > state_qfilestat(fp, mount, XFS_USER_QUOTA, &sv.qs_uquota,
> > sv.qs_flags & XFS_QUOTA_UDQ_ACCT,
> > sv.qs_flags & XFS_QUOTA_UDQ_ENFD);
> > + state_timelimit(fp, XFS_BLOCK_QUOTA, sv.qs_btimelimit);
> > + state_timelimit(fp, XFS_INODE_QUOTA, sv.qs_itimelimit);
> > + state_timelimit(fp, XFS_RTBLOCK_QUOTA, sv.qs_rtbtimelimit);
> > + }
>
> Any chance we could factor this repititive code into a helper?
>
Yeah, that makes sense. I'll do it.
Thanks-
Bill
prev parent reply other threads:[~2020-07-10 13:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 21:26 [PATCH] xfsprogs: xfs_quota state command should report ugp grace times Bill O'Donnell
2020-07-10 9:00 ` Christoph Hellwig
2020-07-10 13:53 ` Bill O'Donnell [this message]
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=20200710135347.GA249437@redhat.com \
--to=billodo@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/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).