[lustre-devel] [PATCH 41/50] lustre: quota: delete unused quota ID

James Simmons jsimmons at infradead.org
Sun Mar 20 06:30:55 PDT 2022

From: Hongchao Zhang <hongchao at whamcloud.com>

Add ability for user land to delete unused quota ID.

WC-bug-id: https://jira.whamcloud.com/browse/LU-15218
Lustre-commit: 78be823f333968197 ("LU-15218 quota: delete unused quota ID")
Signed-off-by: Hongchao Zhang <hongchao at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45548
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli at ddn.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
 fs/lustre/llite/dir.c                   | 1 +
 include/uapi/linux/lustre/lustre_user.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/fs/lustre/llite/dir.c b/fs/lustre/llite/dir.c
index d3df4d0..4165726 100644
--- a/fs/lustre/llite/dir.c
+++ b/fs/lustre/llite/dir.c
@@ -1145,6 +1145,7 @@ int quotactl_ioctl(struct super_block *sb, struct if_quotactl *qctl)
 		if (!capable(CAP_SYS_ADMIN))
 			return -EPERM;
diff --git a/include/uapi/linux/lustre/lustre_user.h b/include/uapi/linux/lustre/lustre_user.h
index 96efdf0..9892fc5 100644
--- a/include/uapi/linux/lustre/lustre_user.h
+++ b/include/uapi/linux/lustre/lustre_user.h
@@ -992,6 +992,7 @@ static inline void obd_uuid2fsname(char *buf, char *uuid, int buflen)
 #define LUSTRE_Q_SETINFOPOOL	0x800012	/* set pool quota info */
 #define LUSTRE_Q_GETDEFAULT_POOL	0x800013 /* get default pool quota*/
 #define LUSTRE_Q_SETDEFAULT_POOL	0x800014 /* set default pool quota */
+#define LUSTRE_Q_DELETEQID	0x800015  /* delete quota ID */
 /* In the current Lustre implementation, the grace time is either the time
  * or the timestamp to be used after some quota ID exceeds the soft limt,
  * 48 bits should be enough, its high 16 bits can be used as quota flags.
@@ -1011,6 +1012,7 @@ static inline void obd_uuid2fsname(char *buf, char *uuid, int buflen)
  * and high 16 bits will contain this flag (see above comment).
 #define LQUOTA_FLAG_DEFAULT	0x0001
+#define LQUOTA_FLAG_DELETED	0x0002
 #define LUSTRE_Q_CMD_IS_POOL(cmd)		\

More information about the lustre-devel mailing list