Skip to contentSkip to conversation

quota: report warning limits for realtime space quotas

PATCH In review Darrick J. Wong 2 participants 2 messages Mar 18, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 quota: report warning limits for realtime space quotas

From: Darrick J. Wong <[email protected]>

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.

---
 fs/quota/quota.c               |    1 +
 include/uapi/linux/dqblk_xfs.h |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
fs/quota/quota.c +1 -0
index 6d16b2be5ac4..6ad06727e8ea 100644
@@ -471,6 +471,7 @@ static int quota_getstatev(struct super_block *sb, int type,
 	fqs->qs_rtbtimelimit = state.s_state[type].rt_spc_timelimit;
 	fqs->qs_bwarnlimit = state.s_state[type].spc_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 */
 	if (state.s_state[USRQUOTA].ino) {
include/uapi/linux/dqblk_xfs.h +4 -1
index c71d909addda..8cda3e62e0e7 100644
@@ -219,7 +219,10 @@ struct fs_quota_statv {
 	__s32			qs_rtbtimelimit;/* limit for rt blks timer */
 	__u16			qs_bwarnlimit;	/* 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 */
reviewer
#1 lore raw
Quoted 7 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

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.

Thanks. I've added the patch to my tree.

Honza

Quoted 33 lines
---
 fs/quota/quota.c               |    1 +
 include/uapi/linux/dqblk_xfs.h |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
fs/quota/quota.c +1 -0
index 6d16b2be5ac4..6ad06727e8ea 100644
@@ -471,6 +471,7 @@ static int quota_getstatev(struct super_block *sb, int type,
 	fqs->qs_rtbtimelimit = state.s_state[type].rt_spc_timelimit;
 	fqs->qs_bwarnlimit = state.s_state[type].spc_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 */
 	if (state.s_state[USRQUOTA].ino) {
include/uapi/linux/dqblk_xfs.h +4 -1
index c71d909addda..8cda3e62e0e7 100644
@@ -219,7 +219,10 @@ struct fs_quota_statv {
 	__s32			qs_rtbtimelimit;/* limit for rt blks timer */
 	__u16			qs_bwarnlimit;	/* 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 */
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR