From: Dmitry Monakhov <dmonakhov@openvz.org>
To: linux-fsdevel@vger.kernel.org
Cc: linux-ext4@vger.kernel.org, Dmitry Monakhov <dmonakhov@openvz.org>
Subject: [PATCH 1/5] vfs: Add additional owner identifier
Date: Thu, 4 Mar 2010 21:34:33 +0300 [thread overview]
Message-ID: <1267727677-11956-2-git-send-email-dmonakhov@openvz.org> (raw)
In-Reply-To: <1267727677-11956-1-git-send-email-dmonakhov@openvz.org>
This patch add project inode identifier. Project ID may be used as
auxiliary owner specifier in addition to standard uid/gid.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
fs/Kconfig | 7 +++++++
include/linux/fs.h | 4 ++++
include/linux/xattr.h | 3 +++
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/fs/Kconfig b/fs/Kconfig
index 5f85b59..23957c0 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -54,6 +54,13 @@ config FILE_LOCKING
This option enables standard file locking support, required
for filesystems like NFS and for the flock() system
call. Disabling this option saves about 11k.
+config PROJECT_ID
+ bool "Enable project inode identifier"
+ default y
+ help
+ This option enables project inode identifier. Project ID
+ may be used as auxiliary owner specifier in addition to
+ standard uid/gid.
source "fs/notify/Kconfig"
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 30eee24..0218906 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -753,6 +753,10 @@ struct inode {
#ifdef CONFIG_QUOTA
struct dquot *i_dquot[MAXQUOTAS];
#endif
+#ifdef CONFIG_PROJECT_ID
+ /* Project id, protected by i_mutex similar to i_uid/i_gid */
+ __u32 i_prjid;
+#endif
struct list_head i_devices;
union {
struct pipe_inode_info *i_pipe;
diff --git a/include/linux/xattr.h b/include/linux/xattr.h
index fb9b7e6..9d85a4b 100644
--- a/include/linux/xattr.h
+++ b/include/linux/xattr.h
@@ -33,6 +33,9 @@
#define XATTR_USER_PREFIX "user."
#define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1)
+#define XATTR_PRJID "system.project_id"
+#define XATTR_PRJID_LEN (sizeof (XATTR_PRJID))
+
struct inode;
struct dentry;
--
1.6.6
next prev parent reply other threads:[~2010-03-04 18:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 18:34 [PATCH 0/5] RFC: introduce extended inode owner identifier v5 Dmitry Monakhov
2010-03-04 18:34 ` Dmitry Monakhov [this message]
2010-03-04 18:34 ` [PATCH 2/5] quota: Implement project id support for generic quota Dmitry Monakhov
2010-03-04 18:34 ` [PATCH 3/5] ext4: Implement project ID support for ext4 filesystem Dmitry Monakhov
2010-03-04 18:34 ` [PATCH 4/5] ext4: add isolated project support Dmitry Monakhov
2010-03-04 18:34 ` [PATCH 5/5] ext4: add project quota support Dmitry Monakhov
2010-03-04 20:07 ` [PATCH 4/5] ext4: add isolated project support Jan Kara
2010-03-04 20:34 ` Dmitry Monakhov
2010-03-11 12:07 ` Christoph Hellwig
2010-03-11 12:06 ` [PATCH 3/5] ext4: Implement project ID support for ext4 filesystem Christoph Hellwig
2010-03-11 13:30 ` Dmitry Monakhov
2010-03-11 19:54 ` Andreas Dilger
2010-03-11 22:01 ` tytso
2010-03-12 9:32 ` Dmitry Monakhov
2010-03-12 20:07 ` J. Bruce Fields
2010-03-11 12:03 ` [PATCH 2/5] quota: Implement project id support for generic quota Christoph Hellwig
2010-03-11 13:17 ` Dmitry Monakhov
2010-03-11 12:01 ` [PATCH 1/5] vfs: Add additional owner identifier Christoph Hellwig
2010-03-11 13:11 ` Dmitry Monakhov
2010-03-11 18:51 ` J. Bruce Fields
2010-03-11 19:40 ` Andreas Dilger
2010-03-12 8:47 ` Dmitry Monakhov
-- strict thread matches above, loose matches on Subject: below --
2010-03-18 14:02 [PATCH 0/5] RFC: introduce extended inode owner identifier v6 Dmitry Monakhov
2010-03-18 14:02 ` [PATCH 1/5] vfs: Add additional owner identifier 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=1267727677-11956-2-git-send-email-dmonakhov@openvz.org \
--to=dmonakhov@openvz.org \
--cc=linux-ext4@vger.kernel.org \
--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).