linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: linux-ext4@vger.kernel.org
Cc: Jan Kara <jack@suse.cz>, Dmitry Monakhov <dmonakhov@openvz.org>
Subject: [PATCH 06/11] quota: add generic subtree quota support
Date: Mon, 08 Feb 2010 16:28:08 +0300	[thread overview]
Message-ID: <1265635693-12182-7-git-send-email-dmonakhov@openvz.org> (raw)
In-Reply-To: <1265635693-12182-6-git-send-email-dmonakhov@openvz.org>

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(-)

diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 033c271..5483149 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -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;
 }
diff --git a/fs/quota/quotaio_v2.h b/fs/quota/quotaio_v2.h
index f1966b4..01e8203 100644
--- a/fs/quota/quotaio_v2.h
+++ b/fs/quota/quotaio_v2.h
@@ -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 */
diff --git a/include/linux/quota.h b/include/linux/quota.h
index abf6a5a..0bcd295 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -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", \
 };
 
-- 
1.6.3.3


  reply	other threads:[~2010-02-08 14:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08 13:28 [PATCH 00/11] [RFC] Introduce subtree quota support This patch set introduce subtree and subtree-quota support for ext4 Dmitry Monakhov
2010-02-08 13:28 ` [PATCH 01/11] ext4: mount flags manipulation cleanup Dmitry Monakhov
2010-02-08 13:28   ` [PATCH 02/11] ext4: trivial quota cleanup Dmitry Monakhov
2010-02-08 13:28     ` [PATCH 03/11] quota: sb_quota state flags cleanup Dmitry Monakhov
2010-02-08 13:28       ` [PATCH 04/11] quota: generalize quota transfer interface Dmitry Monakhov
2010-02-08 13:28         ` [PATCH 05/11] quota: introduce get_id callback Dmitry Monakhov
2010-02-08 13:28           ` Dmitry Monakhov [this message]
2010-02-08 13:28             ` [PATCH 07/11] ext4: enlarge mount option field Dmitry Monakhov
2010-02-08 13:28               ` [PATCH 08/11] ext4: introduce subtree logic Dmitry Monakhov
2010-02-08 13:28                 ` [PATCH 09/11] ext4: subtree add kconfig options Dmitry Monakhov
2010-02-08 13:28                   ` [PATCH 10/11] ext4: add subtree support Dmitry Monakhov
2010-02-08 13:28                     ` [PATCH 11/11] ext4: add subtree quota support Dmitry Monakhov
2010-02-09  0:10                   ` [PATCH 09/11] ext4: subtree add kconfig options Greg Freemyer
2010-02-08 23:54                 ` [PATCH 08/11] ext4: introduce subtree logic Greg Freemyer
2010-02-09 10:06                   ` Dmitry Monakhov
2010-02-09 13:36                     ` Greg Freemyer
2010-02-09 13:53                       ` Dmitry Monakhov
2010-02-09 14:29                         ` Greg Freemyer
2010-02-09 14:48                           ` Dmitry Monakhov
2010-02-09 14:52                             ` Greg Freemyer
2010-02-09 15:21                               ` Dmitry Monakhov
2010-02-09  0:49                 ` Andreas Dilger
2010-02-09  9:29                   ` Dmitry Monakhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1265635693-12182-7-git-send-email-dmonakhov@openvz.org \
    --to=dmonakhov@openvz.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).