All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Jan Kara <jack@suse.cz>, linux-xfs <linux-xfs@vger.kernel.org>
Cc: "Petr Písař" <ppisar@redhat.com>
Subject: [PATCH] quota-tools: Set FS_DQ_TIMER_MASK for individual xfs grace times
Date: Wed, 13 May 2020 22:45:32 -0500	[thread overview]
Message-ID: <72a454f1-c2ee-b777-90db-6bdfd4a8572c@redhat.com> (raw)

xfs quota code doesn't currently allow increasing an individual
user's grace time, but kernel patches are in development for this.

In order for setquota to be able to send this update via
setquota -T, we need to add the FS_DQ_TIMER_MASK when we are trying
to update the grace times on an individual user's dquot.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

I wonder if we should only be setting the LIMIT_MASK only if
(flags & COMMIT_LIMITS), but it doesn't seem to be a problem and
is unrelated to this change I'm leaving it alone for now, though if
anyone thinks it's better I can update the patch.

I'm putting together xfstests cases for this, if you want to wait
for those, that's fine.  Thanks!

diff --git a/quotaio_xfs.c b/quotaio_xfs.c
index b22c7b4..a4d6f67 100644
--- a/quotaio_xfs.c
+++ b/quotaio_xfs.c
@@ -166,6 +166,8 @@ static int xfs_commit_dquot(struct dquot *dquot, int flags)
 			xdqblk.d_fieldmask |= FS_DQ_BCOUNT;
 	} else {
 		xdqblk.d_fieldmask |= FS_DQ_LIMIT_MASK;
+		if (flags & COMMIT_TIMES) /* indiv grace period */
+			xdqblk.d_fieldmask |= FS_DQ_TIMER_MASK;
 	}
 
 	qcmd = QCMD(Q_XFS_SETQLIM, h->qh_type);


             reply	other threads:[~2020-05-14  3:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14  3:45 Eric Sandeen [this message]
2020-05-14 10:20 ` [PATCH] quota-tools: Set FS_DQ_TIMER_MASK for individual xfs grace times Jan Kara
2020-05-19 17:19   ` Eric Sandeen
2020-05-20 14:27     ` Jan Kara
2020-05-20 14:56       ` 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=72a454f1-c2ee-b777-90db-6bdfd4a8572c@redhat.com \
    --to=sandeen@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-xfs@vger.kernel.org \
    --cc=ppisar@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 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.