1 quota: add generic treeid quota support
3 Just introduce new and update macros.
5 diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
6 index 13503af..b03c26a 100644
9 @@ -1021,6 +1021,11 @@ static int need_print_warning(struct dquot *dquot)
10 return current_fsuid() == dquot->dq_id;
12 return in_group_p(dquot->dq_id);
14 + //// FIXME: Figure out in which container this task
15 + //// belongs to. It is strange, but seems it is
16 + //// impossible to understand from current->css_set.
21 diff --git a/fs/quota/quota.c b/fs/quota/quota.c
22 index 95c5b42..a957a72 100644
23 --- a/fs/quota/quota.c
24 +++ b/fs/quota/quota.c
25 @@ -84,6 +84,9 @@ static int generic_quotactl_valid(struct super_block *sb, int type, int cmd,
26 if (((type == USRQUOTA && current_euid() != id) ||
27 (type == GRPQUOTA && !in_egroup_p(id))) &&
28 !capable(CAP_SYS_ADMIN))
29 + //// FIXME: Figure out in which container this task
30 + //// belongs to. It is strange, but seems it is
31 + //// impossible to understand from current->css_set.
34 else if (cmd != Q_GETFMT && cmd != Q_SYNC && cmd != Q_GETINFO)
35 diff --git a/fs/quota/quotaio_v2.h b/fs/quota/quotaio_v2.h
36 index 530fe58..d6261ef 100644
37 --- a/fs/quota/quotaio_v2.h
38 +++ b/fs/quota/quotaio_v2.h
41 #define V2_INITQMAGICS {\
42 0xd9c01f11, /* USRQUOTA */\
43 - 0xd9c01927 /* GRPQUOTA */\
44 + 0xd9c01927, /* GRPQUOTA */ \
45 + 0xd9c03f14 /* TRQUOTA */\
48 #define V2_INITQVERSIONS {\
55 /* First generic header */
56 diff --git a/include/linux/quota.h b/include/linux/quota.h
57 index 675ca18..eb080c3 100644
58 --- a/include/linux/quota.h
59 +++ b/include/linux/quota.h
61 #include <linux/errno.h>
62 #include <linux/types.h>
64 -#define __DQUOT_VERSION__ "dquot_6.5.2"
65 +////FIXME: dmon implement trquota support for quota-tools
66 +#define __DQUOT_VERSION__ "dquot_7.0.0"
70 #define USRQUOTA 0 /* element used for user quotas */
71 #define GRPQUOTA 1 /* element used for group quotas */
72 +#define TRQUOTA 2 /* element used for directory tree quotas */
75 * Definitions for the default names of the quotas files.
77 #define INITQFNAMES { \
78 "user", /* USRQUOTA */ \
79 "group", /* GRPQUOTA */ \
80 + "tree", /* TRQUOTA */ \