Commit f998d7d5 authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Jan Kara

quota: report warning limits for realtime space quotas

Report the number of warnings that a user will get for exceeding the
soft limit of a realtime volume.  This plugs a gap needed before we
can land a realtime quota implementation for XFS in the next cycle.

Link: https://lore.kernel.org/r/20210318041736.GB22094@magnoliaSigned-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent fa8b9007
...@@ -472,6 +472,7 @@ static int quota_getstatev(struct super_block *sb, int type, ...@@ -472,6 +472,7 @@ static int quota_getstatev(struct super_block *sb, int type,
fqs->qs_rtbtimelimit = state.s_state[type].rt_spc_timelimit; fqs->qs_rtbtimelimit = state.s_state[type].rt_spc_timelimit;
fqs->qs_bwarnlimit = state.s_state[type].spc_warnlimit; fqs->qs_bwarnlimit = state.s_state[type].spc_warnlimit;
fqs->qs_iwarnlimit = state.s_state[type].ino_warnlimit; fqs->qs_iwarnlimit = state.s_state[type].ino_warnlimit;
fqs->qs_rtbwarnlimit = state.s_state[type].rt_spc_warnlimit;
/* Inodes may be allocated even if inactive; copy out if present */ /* Inodes may be allocated even if inactive; copy out if present */
if (state.s_state[USRQUOTA].ino) { if (state.s_state[USRQUOTA].ino) {
......
...@@ -219,7 +219,10 @@ struct fs_quota_statv { ...@@ -219,7 +219,10 @@ struct fs_quota_statv {
__s32 qs_rtbtimelimit;/* limit for rt blks timer */ __s32 qs_rtbtimelimit;/* limit for rt blks timer */
__u16 qs_bwarnlimit; /* limit for num warnings */ __u16 qs_bwarnlimit; /* limit for num warnings */
__u16 qs_iwarnlimit; /* limit for num warnings */ __u16 qs_iwarnlimit; /* limit for num warnings */
__u64 qs_pad2[8]; /* for future proofing */ __u16 qs_rtbwarnlimit;/* limit for rt blks warnings */
__u16 qs_pad3;
__u32 qs_pad4;
__u64 qs_pad2[7]; /* for future proofing */
}; };
#endif /* _LINUX_DQBLK_XFS_H */ #endif /* _LINUX_DQBLK_XFS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment