summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_qm.h
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.h
parent51dbb1be52fedfe7f612854bfcba3400043a7a75 (diff)
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.h')
-rw-r--r--fs/xfs/xfs_qm.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/fs/xfs/xfs_qm.h b/fs/xfs/xfs_qm.h
index 57bddadbc051..11c28ff0298c 100644
--- a/fs/xfs/xfs_qm.h
+++ b/fs/xfs/xfs_qm.h
@@ -30,20 +30,18 @@ extern struct kmem_zone *xfs_qm_dqtrxzone;
!dqp->q_rtb.count && \
!dqp->q_ino.count)
+struct xfs_quota_limits {
+ xfs_qcnt_t hard; /* default hard limit */
+ xfs_qcnt_t soft; /* default soft limit */
+ time64_t time; /* limit for timers */
+ xfs_qwarncnt_t warn; /* limit for warnings */
+};
+
/* Defaults for each quota type: time limits, warn limits, usage limits */
struct xfs_def_quota {
- time64_t btimelimit; /* limit for blks timer */
- time64_t itimelimit; /* limit for inodes timer */
- time64_t rtbtimelimit; /* limit for rt blks timer */
- xfs_qwarncnt_t bwarnlimit; /* limit for blks warnings */
- xfs_qwarncnt_t iwarnlimit; /* limit for inodes warnings */
- xfs_qwarncnt_t rtbwarnlimit; /* limit for rt blks warnings */
- xfs_qcnt_t bhardlimit; /* default data blk hard limit */
- xfs_qcnt_t bsoftlimit; /* default data blk soft limit */
- xfs_qcnt_t ihardlimit; /* default inode count hard limit */
- xfs_qcnt_t isoftlimit; /* default inode count soft limit */
- xfs_qcnt_t rtbhardlimit; /* default realtime blk hard limit */
- xfs_qcnt_t rtbsoftlimit; /* default realtime blk soft limit */
+ struct xfs_quota_limits blk;
+ struct xfs_quota_limits ino;
+ struct xfs_quota_limits rtb;
};
/*