[PATCH] quota-tools: Set FS_DQ_TIMER_MASK for individual xfs grace times

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

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);




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux