summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-09-30 10:43:09 +0200
committerJan Kara <jack@suse.cz>2014-11-10 10:06:08 +0100
commit2c5f648aa24a7c8f0668d8ce5722d69da5bef739 (patch)
tree569961ba122f15e947a0f0dbe71c6994b8e00b2c /include/linux
parent6bab3596bbede980c067eaeaf6a470c262888dac (diff)
downloadlinux-2c5f648aa24a7c8f0668d8ce5722d69da5bef739.tar.gz
linux-2c5f648aa24a7c8f0668d8ce5722d69da5bef739.tar.bz2
linux-2c5f648aa24a7c8f0668d8ce5722d69da5bef739.zip
quota: Allow each filesystem to specify which quota types it supports
Currently all filesystems supporting VFS quota support user and group quotas. With introduction of project quotas this is going to change so make sure filesystem isn't called for quota type it doesn't support by introduction of a bitmask determining which quota types each filesystem supports. Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h1
-rw-r--r--include/linux/quota.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9ab779e8a63c..cf55a5483d40 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1224,6 +1224,7 @@ struct super_block {
struct backing_dev_info *s_bdi;
struct mtd_info *s_mtd;
struct hlist_node s_instances;
+ unsigned int s_quota_types; /* Bitmask of supported quota types */
struct quota_info s_dquot; /* Diskquota specific options */
struct sb_writers s_writers;
diff --git a/include/linux/quota.h b/include/linux/quota.h
index 80d345a3524c..50978b781a19 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -56,6 +56,11 @@ enum quota_type {
PRJQUOTA = 2, /* element used for project quotas */
};
+/* Masks for quota types when used as a bitmask */
+#define QTYPE_MASK_USR (1 << USRQUOTA)
+#define QTYPE_MASK_GRP (1 << GRPQUOTA)
+#define QTYPE_MASK_PRJ (1 << PRJQUOTA)
+
typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */
typedef long long qsize_t; /* Type in which we store sizes */