summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qm.h
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2020-05-21 13:07:01 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-05-27 08:49:26 -0700
commite850301f0981741c47f5ee423380a2a963fce563 (patch)
treecb2d8ef1df1bc7ed4734803066bf6e01e4d8b1e7 /fs/xfs/xfs_qm.h
parentce6e7e79ced35a8ba4576d70bb999e8835f95769 (diff)
downloadlinux-e850301f0981741c47f5ee423380a2a963fce563.tar.gz
linux-e850301f0981741c47f5ee423380a2a963fce563.tar.bz2
linux-e850301f0981741c47f5ee423380a2a963fce563.zip
xfs: per-type quota timers and warn limits
Move timers and warnings out of xfs_quotainfo and into xfs_def_quota so that we can utilize them on a per-type basis, rather than enforcing them based on the values found in the first enabled quota type. Signed-off-by: Eric Sandeen <sandeen@redhat.com> [zlang: new way to get defquota in xfs_qm_init_timelimits] [zlang: remove redundant defq assign] Signed-off-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_qm.h')
-rw-r--r--fs/xfs/xfs_qm.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/xfs/xfs_qm.h b/fs/xfs/xfs_qm.h
index c6f83171357e..7b0e771fcbce 100644
--- a/fs/xfs/xfs_qm.h
+++ b/fs/xfs/xfs_qm.h
@@ -41,7 +41,14 @@ extern struct kmem_zone *xfs_qm_dqtrxzone;
*/
#define XFS_DQUOT_CLUSTER_SIZE_FSB (xfs_filblks_t)1
+/* 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 */
@@ -64,12 +71,6 @@ struct xfs_quotainfo {
struct xfs_inode *qi_pquotaip; /* project quota inode */
struct list_lru qi_lru;
int qi_dquots;
- time64_t qi_btimelimit; /* limit for blks timer */
- time64_t qi_itimelimit; /* limit for inodes timer */
- time64_t qi_rtbtimelimit;/* limit for rt blks timer */
- xfs_qwarncnt_t qi_bwarnlimit; /* limit for blks warnings */
- xfs_qwarncnt_t qi_iwarnlimit; /* limit for inodes warnings */
- xfs_qwarncnt_t qi_rtbwarnlimit;/* limit for rt blks warnings */
struct mutex qi_quotaofflock;/* to serialize quotaoff */
xfs_filblks_t qi_dqchunklen; /* # BBs in a chunk of dqs */
uint qi_dqperchunk; /* # ondisk dq in above chunk */