summaryrefslogtreecommitdiffstats
path: root/include/linux/quota.h
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/quota.h
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/quota.h')
-rw-r--r--include/linux/quota.h5
1 files changed, 5 insertions, 0 deletions
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 */