From af30cb446dd5f4ad5b93d7d4188c49a864c0d643 Mon Sep 17 00:00:00 2001 From: Chandra Seetharaman Date: Tue, 6 Aug 2013 17:27:07 -0500 Subject: quota: Add a new quotactl command Q_XGETQSTATV XFS now supports three types of quotas (user, group and project). Current version of Q_XGETSTAT has support for only two types of quotas. In order to support three types of quotas, the interface, specifically struct fs_quota_stat, need to be expanded. Current version of fs_quota_stat does not allow expansion without breaking backward compatibility. So, a quotactl command and new fs_quota_stat structure need to be added. This patch adds a new command Q_XGETQSTATV to quotactl() which takes a new data structure fs_quota_statv. This new data structure provides support for future expansion and backward compatibility. Callers of the new quotactl command have to set the version of the data structure being passed, and kernel will fill as much data as requested. If the kernel does not support the user-space provided version, EINVAL will be returned. User-space can reduce the version number and call the same quotactl again. Signed-off-by: Chandra Seetharaman Reviewed-by: Jan Kara Reviewed-by: Rich Johnston Signed-off-by: Ben Myers [v2: Applied rjohnston's suggestions as per Chandra's request. -bpm] --- include/linux/quota.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/quota.h') diff --git a/include/linux/quota.h b/include/linux/quota.h index d13371134c59..cc7494a35429 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -328,6 +328,7 @@ struct quotactl_ops { int (*set_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *); int (*get_xstate)(struct super_block *, struct fs_quota_stat *); int (*set_xstate)(struct super_block *, unsigned int, int); + int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); }; struct quota_format_type { -- cgit v1.2.3