Blame SOURCES/quota-4.05-quota-tools-Set-FS_DQ_TIMER_MASK-for-individual-xfs-.patch

d26b56
From be96da2353669d433b0abddb85b26ccaf35e3451 Mon Sep 17 00:00:00 2001
d26b56
From: Eric Sandeen <sandeen@redhat.com>
d26b56
Date: Thu, 14 May 2020 12:17:29 +0200
d26b56
Subject: [PATCH 1/2] quota-tools: Set FS_DQ_TIMER_MASK for individual xfs
d26b56
 grace times
d26b56
MIME-Version: 1.0
d26b56
Content-Type: text/plain; charset=UTF-8
d26b56
Content-Transfer-Encoding: 8bit
d26b56
d26b56
xfs quota code doesn't currently allow increasing an individual
d26b56
user's grace time, but kernel patches are in development for this.
d26b56
d26b56
In order for setquota to be able to send this update via
d26b56
setquota -T, we need to add the FS_DQ_TIMER_MASK when we are trying
d26b56
to update the grace times on an individual user's dquot.
d26b56
d26b56
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
d26b56
Signed-off-by: Jan Kara <jack@suse.cz>
d26b56
Signed-off-by: Petr Písař <ppisar@redhat.com>
d26b56
---
d26b56
 quotaio_xfs.c | 2 ++
d26b56
 1 file changed, 2 insertions(+)
d26b56
d26b56
diff --git a/quotaio_xfs.c b/quotaio_xfs.c
d26b56
index b22c7b4..a4d6f67 100644
d26b56
--- a/quotaio_xfs.c
d26b56
+++ b/quotaio_xfs.c
d26b56
@@ -166,6 +166,8 @@ static int xfs_commit_dquot(struct dquot *dquot, int flags)
d26b56
 			xdqblk.d_fieldmask |= FS_DQ_BCOUNT;
d26b56
 	} else {
d26b56
 		xdqblk.d_fieldmask |= FS_DQ_LIMIT_MASK;
d26b56
+		if (flags & COMMIT_TIMES) /* indiv grace period */
d26b56
+			xdqblk.d_fieldmask |= FS_DQ_TIMER_MASK;
d26b56
 	}
d26b56
 
d26b56
 	qcmd = QCMD(Q_XFS_SETQLIM, h->qh_type);
d26b56
-- 
d26b56
2.25.4
d26b56