[PATCH 0/6] RFC: introduce extended inode owner identifier v4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is new generation of attempt to add extended inode identifier.
In previous posts it was called tree_id, subtree_id, project_id.
But after none of this was not good enough. I've refused project_id
because it is well know XFS feature. And my implementation is
slightly different from it especially from user-space point of view.
In order to avoid ambiguity i've stopped at the "metagroup" term.
I hope it is final name for the feature.

*Feature description*
1) Inode may has a metagroup identifier which has same meaning as uid/gid.
2) Id is stored in inode's xattr named "system.metagroup"
3) Id is inherent from parent inode on creation.
4) This id is cached in memory inode structure(inside fsprivate_inode)
   and is accessible from vfs layer.
5) Since id is cached in memory it may be used for different purposes
   such as:
5A) Implement additional quota id space ortohonal to uid/gid. This is
    useful in managing quota for some filesystem hierarchy(chroot or
    container over bindmount)
5B) Export dedicated fs hierarchy to nfsd (only inode which has some
    metagroup will be accessible via nfsd)

*Implementation details*

It is unlikely that everybody will be happy to have new field in
vfs_inode(which is not widely used). What's why this field is
stored inside private_inode.

But we have to have an access to this private_field.
First time similar issue was resolved while implementing
generic quota reserved_space management interface.
Jan suggested to implement some sort auxiliary inode attributes map.
And access non standard inode attributes via this aux_attr_map.
I've implemented this idea in form of per-sb aux_attribute table.
(Macros is not good here because different attributes may have
different types which result in massive typecasting).
If someone have better ideas please say you word.

In order to give an overview of this interface i've converted
quota's reserved space interface to that new aux_attr_table.

After we have generic interface for auxiliary attributes
each filesystem may implement metagroup support in it's own meaner.

This should be done in following steps:
1) Add field to private_inode, and export it via aux_attribute
2) Implement id inheritance on inode creation
3) Implement handler for "system.metagroup" xattr.

This patch contains an example implementation of this for ext4.

The patch-set is compile tested only.

Signed-off-by: Dmitry Monakhov <dmonakhov@xxxxxxxxxx>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 12b1aa1..c9aef25 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 33
-EXTRAVERSION = -rc8
+EXTRAVERSION = -rc8-metagroup
 NAME = Man-Eating Seals of Antiquity
 
 # *DOCUMENTATION*
-- 
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux