@@ -1041,6 +1041,11 @@ static int need_print_warning(struct dquot *dquot)
return current_fsuid() == dquot->dq_id;
case GRPQUOTA:
return in_group_p(dquot->dq_id);
+ case SBTRQUOTA:
+ /* XXX: Currently there is no way to understand
+ which subtree this task belonges to, So print
+ a warn message unconditionally. -dmon */
+ return 1;
}
return 0;
}
@@ -13,12 +13,14 @@
*/
#define V2_INITQMAGICS {\
0xd9c01f11, /* USRQUOTA */\
- 0xd9c01927 /* GRPQUOTA */\
+ 0xd9c01927, /* GRPQUOTA */\
+ 0xd9c03f14 /* SBTRQUOTA */\
}
#define V2_INITQVERSIONS {\
1, /* USRQUOTA */\
- 1 /* GRPQUOTA */\
+ 1, /* GRPQUOTA */ \
+ 1 /* SBTRPQUOTA */\
}
/* First generic header */
@@ -36,11 +36,12 @@
#include <linux/errno.h>
#include <linux/types.h>
-#define __DQUOT_VERSION__ "dquot_6.5.2"
+#define __DQUOT_VERSION__ "dquot_6.6.0"
-#define MAXQUOTAS 2
+#define MAXQUOTAS 3
#define USRQUOTA 0 /* element used for user quotas */
#define GRPQUOTA 1 /* element used for group quotas */
+#define SBTRQUOTA 2 /* element used for directory tree quotas */
/*
* Definitions for the default names of the quotas files.
@@ -48,6 +49,7 @@
#define INITQFNAMES { \
"user", /* USRQUOTA */ \
"group", /* GRPQUOTA */ \
+ "subtree", /* SBTRQUOTA */ \
"undefined", \
};
Just introduce new and update macros. It will be used later. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> --- fs/quota/dquot.c | 5 +++++ fs/quota/quotaio_v2.h | 6 ++++-- include/linux/quota.h | 6 ++++-- 3 files changed, 13 insertions(+), 4 deletions(-)