Re: [PATCH 08/11] ext4: introduce subtree logic

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

 



On Mon, Feb 8, 2010 at 8:28 AM, Dmitry Monakhov <dmonakhov@xxxxxxxxxx> wrote:
> * Abstract
>  A subtree of a directory tree T is a tree consisting of a directory
>  (the subtree root) in T and all of its descendants in T.
>
>  Subtree feature allows to create an isolated (from user point of view)
>  trees.
>
>  Subtree assumptions:
>  (1) Each inode has subtree id. This id is persistently stored inside
>      inode (xattr, usually inside ibody)
>  (2) Subtree id is inherent from parent directory
>  (3) Inode can not belongs to different subtree
>      Otherwise changes in one subtree result in changes in other subtree
>      which contradict to isolation criteria.
>
>  This feature is similar to project-id in XFS. One may assign some id to
>  a subtree. Each entry from the subtree may be accounted in directory
>  subtree quota. Will appear in later patches.
>
> * Disk layout
>  Subtree id is stored on disk inside xattr usually inside ibody.
>  Xattr is used only as a data storage, It has not user visiable xattr
>  interface.
>
> Signed-off-by: Dmitry Monakhov <dmonakhov@xxxxxxxxxx>

Dmitry,

I think the idea of subtrees is useful, but I'm curious about other
use cases than just quota.

At first glance you are attempting to create a generic subtree
functionality for ext4, but criteria 3) above says a inode can only be
in one subtree at a time.

Thus if quota utilizes subtrees and another future feature were to use
subtrees and the layout of the subtree details were not identical,
they would collide.  Thus with the current patch you can only have one
subtree dependent feature at a time for a given filesystem.

It seems you need something along the lines of a subtree name space
etc. in order to allow orthogonal service users to create orthogonal
subtrees.

Also, I can envision use cases where you have subtrees within subtrees.

Envision a projects folder that forms one subtree, but one specific
project within that folder needs to be in its own subtree.  If I read
your patch description right, that is not allowed because only
directories of subtree 0 are allowed to contain diverging subtrees.

ie.  A directory of subtree 0 can contain a directory of subtrees 1
and 2, but a directory of subtree 10 is not allowed to contain
subtrees 11 and 12.

Just food for thought.

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

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux