diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-07-14 20:37:32 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-07-29 06:24:14 +0300 |
commit | 438769e31e4410a20ea0df0ed1769516ae80740d (patch) | |
tree | 3a1193e01e87e6e123f5dfb5c5bdc59914c74bf6 /fs/xfs/xfs_dquot.c | |
parent | 51dbb1be52fedfe7f612854bfcba3400043a7a75 (diff) | |
download | linux-438769e31e4410a20ea0df0ed1769516ae80740d.tar.xz |
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_dquot.c')
-rw-r--r-- | fs/xfs/xfs_dquot.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index 6ed3cdeb67f0..1827a1043faa 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c @@ -77,22 +77,22 @@ xfs_qm_adjust_dqlimits( ASSERT(dq->q_id); defq = xfs_get_defquota(q, xfs_dquot_type(dq)); - if (defq->bsoftlimit && !dq->q_blk.softlimit) { - dq->q_blk.softlimit = defq->bsoftlimit; + if (defq->blk.soft && !dq->q_blk.softlimit) { + dq->q_blk.softlimit = defq->blk.soft; prealloc = 1; } - if (defq->bhardlimit && !dq->q_blk.hardlimit) { - dq->q_blk.hardlimit = defq->bhardlimit; + if (defq->blk.hard && !dq->q_blk.hardlimit) { + dq->q_blk.hardlimit = defq->blk.hard; prealloc = 1; } - if (defq->isoftlimit && !dq->q_ino.softlimit) - dq->q_ino.softlimit = defq->isoftlimit; - if (defq->ihardlimit && !dq->q_ino.hardlimit) - dq->q_ino.hardlimit = defq->ihardlimit; - if (defq->rtbsoftlimit && !dq->q_rtb.softlimit) - dq->q_rtb.softlimit = defq->rtbsoftlimit; - if (defq->rtbhardlimit && !dq->q_rtb.hardlimit) - dq->q_rtb.hardlimit = defq->rtbhardlimit; + if (defq->ino.soft && !dq->q_ino.softlimit) + dq->q_ino.softlimit = defq->ino.soft; + if (defq->ino.hard && !dq->q_ino.hardlimit) + dq->q_ino.hardlimit = defq->ino.hard; + if (defq->rtb.soft && !dq->q_rtb.softlimit) + dq->q_rtb.softlimit = defq->rtb.soft; + if (defq->rtb.hard && !dq->q_rtb.hardlimit) + dq->q_rtb.hardlimit = defq->rtb.hard; if (prealloc) xfs_dquot_set_prealloc_limits(dq); @@ -137,7 +137,7 @@ xfs_qm_adjust_dqtimers( (dq->q_blk.hardlimit && (dq->q_blk.count > dq->q_blk.hardlimit))) { dq->q_blk.timer = ktime_get_real_seconds() + - defq->btimelimit; + defq->blk.time; } else { dq->q_blk.warnings = 0; } @@ -156,7 +156,7 @@ xfs_qm_adjust_dqtimers( (dq->q_ino.hardlimit && (dq->q_ino.count > dq->q_ino.hardlimit))) { dq->q_ino.timer = ktime_get_real_seconds() + - defq->itimelimit; + defq->ino.time; } else { dq->q_ino.warnings = 0; } @@ -175,7 +175,7 @@ xfs_qm_adjust_dqtimers( (dq->q_rtb.hardlimit && (dq->q_rtb.count > dq->q_rtb.hardlimit))) { dq->q_rtb.timer = ktime_get_real_seconds() + - defq->rtbtimelimit; + defq->rtb.time; } else { dq->q_rtb.warnings = 0; } |