Skip to content

Commit f998d7d

Browse files
Darrick J. Wongjankara
authored andcommitted
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@magnolia Signed-off-by: Darrick J. Wong <[email protected]> Signed-off-by: Jan Kara <[email protected]>
1 parent fa8b900 commit f998d7d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

fs/quota/quota.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ static int quota_getstatev(struct super_block *sb, int type,
472472
fqs->qs_rtbtimelimit = state.s_state[type].rt_spc_timelimit;
473473
fqs->qs_bwarnlimit = state.s_state[type].spc_warnlimit;
474474
fqs->qs_iwarnlimit = state.s_state[type].ino_warnlimit;
475+
fqs->qs_rtbwarnlimit = state.s_state[type].rt_spc_warnlimit;
475476

476477
/* Inodes may be allocated even if inactive; copy out if present */
477478
if (state.s_state[USRQUOTA].ino) {

include/uapi/linux/dqblk_xfs.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,10 @@ struct fs_quota_statv {
219219
__s32 qs_rtbtimelimit;/* limit for rt blks timer */
220220
__u16 qs_bwarnlimit; /* limit for num warnings */
221221
__u16 qs_iwarnlimit; /* limit for num warnings */
222-
__u64 qs_pad2[8]; /* for future proofing */
222+
__u16 qs_rtbwarnlimit;/* limit for rt blks warnings */
223+
__u16 qs_pad3;
224+
__u32 qs_pad4;
225+
__u64 qs_pad2[7]; /* for future proofing */
223226
};
224227

225228
#endif /* _LINUX_DQBLK_XFS_H */

0 commit comments

Comments
 (0)