From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [RFC] vfs generic subtree support Date: Tue, 16 Feb 2010 12:20:29 +0000 Message-ID: <20100216122029.GC30031@ZenIV.linux.org.uk> References: <87tythtptw.fsf@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Dmitry Monakhov Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:52891 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755366Ab0BPMUb (ORCPT ); Tue, 16 Feb 2010 07:20:31 -0500 Content-Disposition: inline In-Reply-To: <87tythtptw.fsf@openvz.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Feb 16, 2010 at 01:52:43PM +0300, Dmitry Monakhov wrote: > Initially i've posted RFC patch-set which add subtree support for ext4. > http://marc.info/?l=linux-ext4&m=126563931215496&w=2 > But in fact this is rather generic feature which may be implemented > in vfs layer similar to namespace or security feature. > > 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 assumptions: > * Each inode has subtree id (this id is stored inside inode). > * Subtree id is inherent from parent directory if corresponding flag is set > * Inode can not belongs to different subtrees > > i've ommit subtree_type feature in order to simplify brief explanation. > > Subtree with id == 0 has special meaning. It may contains roots of > other subtrees (this feature is used for cross subtree renames) > This feature has much in common with XFS project_id. Um. Just how is it different from having normal subtrees mounted separately? And what's the ID for? We already can mount arbitrary subtrees of directory tree from given fs, as many times as we want and in as many places as we like. With each mountpoint acting as barrier to link() and rename().