linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: linux-fsdevel@vger.kernel.org
Cc: jack@suse.cz, Dmitry Monakhov <dmonakhov@openvz.org>
Subject: [PATCH 3/3] quota: add generic treeid quota support
Date: Tue,  2 Feb 2010 18:00:25 +0300	[thread overview]
Message-ID: <1265122826-5370-4-git-send-email-dmonakhov@openvz.org> (raw)
In-Reply-To: <1265122826-5370-3-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 |    4 +++-
 include/linux/quota.h |    6 ++++--
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 36569c9..9fbf301 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -1045,6 +1045,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 TRQUOTA:
+			/* XXX: Currently there is no way to understand
+			   which tree 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..ca6f1ff 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	/* TRQUOTA */\
 }
 
 #define V2_INITQVERSIONS {\
 	1,		/* USRQUOTA */\
 	1		/* GRPQUOTA */\
+	1		/* TRPQUOTA */\
 }
 
 /* First generic header */
diff --git a/include/linux/quota.h b/include/linux/quota.h
index 7f06086..dc6d84e 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_7.0.0"
 
-#define MAXQUOTAS 2
+#define MAXQUOTAS 3
 #define USRQUOTA  0		/* element used for user quotas */
 #define GRPQUOTA  1		/* element used for group quotas */
+#define TRQUOTA   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 */ \
+	"tree",    /* TRQUOTA */ \
 	"undefined", \
 };
 
-- 
1.6.3.3


  reply	other threads:[~2010-02-02 15:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 15:00 [PATCH 0/3] quota: RFC add extend quota types Dmitry Monakhov
2010-02-02 15:00 ` [PATCH 1/3] quota: generalize quota transfer interface Dmitry Monakhov
2010-02-02 15:00   ` [PATCH 2/3] quota: introduce get_id callback Dmitry Monakhov
2010-02-02 15:00     ` Dmitry Monakhov [this message]
2010-02-02 16:10       ` [PATCH 3/3] quota: add generic treeid quota support Jan Kara
2010-02-02 16:05     ` [PATCH 2/3] quota: introduce get_id callback Jan Kara
2010-02-03  5:38       ` Dmitry Monakhov
2010-02-03 10:47         ` Jan Kara
2010-02-03 19:54           ` Dmitry Monakhov
2010-02-02 15:48   ` [PATCH 1/3] quota: generalize quota transfer interface Jan Kara

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=1265122826-5370-4-git-send-email-dmonakhov@openvz.org \
    --to=dmonakhov@openvz.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@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).