summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qm.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-07-14 10:37:32 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-07-28 20:24:14 -0700
commit438769e31e4410a20ea0df0ed1769516ae80740d (patch)
tree3a1193e01e87e6e123f5dfb5c5bdc59914c74bf6 /fs/xfs/xfs_qm.c
parent51dbb1be52fedfe7f612854bfcba3400043a7a75 (diff)
downloadlinux-438769e31e4410a20ea0df0ed1769516ae80740d.tar.bz2
xfs: refactor default quota limits by resource
Now that we've split up the dquot resource fields into separate structs, do the same for the default limits to enable further refactoring. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_qm.c')
-rw-r--r--fs/xfs/xfs_qm.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 1ef666314fa8..8ab4dd4f842d 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -562,12 +562,12 @@ xfs_qm_set_defquota(
* Timers and warnings have been already set, let's just set the
* default limits for this quota type
*/
- defq->bhardlimit = dqp->q_blk.hardlimit;
- defq->bsoftlimit = dqp->q_blk.softlimit;
- defq->ihardlimit = dqp->q_ino.hardlimit;
- defq->isoftlimit = dqp->q_ino.softlimit;
- defq->rtbhardlimit = dqp->q_rtb.hardlimit;
- defq->rtbsoftlimit = dqp->q_rtb.softlimit;
+ defq->blk.hard = dqp->q_blk.hardlimit;
+ defq->blk.soft = dqp->q_blk.softlimit;
+ defq->ino.hard = dqp->q_ino.hardlimit;
+ defq->ino.soft = dqp->q_ino.softlimit;
+ defq->rtb.hard = dqp->q_rtb.hardlimit;
+ defq->rtb.soft = dqp->q_rtb.softlimit;
xfs_qm_dqdestroy(dqp);
}
@@ -584,12 +584,12 @@ xfs_qm_init_timelimits(
defq = xfs_get_defquota(qinf, type);
- defq->btimelimit = XFS_QM_BTIMELIMIT;
- defq->itimelimit = XFS_QM_ITIMELIMIT;
- defq->rtbtimelimit = XFS_QM_RTBTIMELIMIT;
- defq->bwarnlimit = XFS_QM_BWARNLIMIT;
- defq->iwarnlimit = XFS_QM_IWARNLIMIT;
- defq->rtbwarnlimit = XFS_QM_RTBWARNLIMIT;
+ defq->blk.time = XFS_QM_BTIMELIMIT;
+ defq->ino.time = XFS_QM_ITIMELIMIT;
+ defq->rtb.time = XFS_QM_RTBTIMELIMIT;
+ defq->blk.warn = XFS_QM_BWARNLIMIT;
+ defq->ino.warn = XFS_QM_IWARNLIMIT;
+ defq->rtb.warn = XFS_QM_RTBWARNLIMIT;
/*
* We try to get the limits from the superuser's limits fields.
@@ -608,17 +608,17 @@ xfs_qm_init_timelimits(
* more writing. If it is zero, a default is used.
*/
if (dqp->q_blk.timer)
- defq->btimelimit = dqp->q_blk.timer;
+ defq->blk.time = dqp->q_blk.timer;
if (dqp->q_ino.timer)
- defq->itimelimit = dqp->q_ino.timer;
+ defq->ino.time = dqp->q_ino.timer;
if (dqp->q_rtb.timer)
- defq->rtbtimelimit = dqp->q_rtb.timer;
+ defq->rtb.time = dqp->q_rtb.timer;
if (dqp->q_blk.warnings)
- defq->bwarnlimit = dqp->q_blk.warnings;
+ defq->blk.warn = dqp->q_blk.warnings;
if (dqp->q_ino.warnings)
- defq->iwarnlimit = dqp->q_ino.warnings;
+ defq->ino.warn = dqp->q_ino.warnings;
if (dqp->q_rtb.warnings)
- defq->rtbwarnlimit = dqp->q_rtb.warnings;
+ defq->rtb.warn = dqp->q_rtb.warnings;
xfs_qm_dqdestroy(dqp);
}