LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Heads up on VFS based union mount
@ 2007-03-30 10:08 Bharata B Rao
  2007-03-30 19:04 ` Jan Engelhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Bharata B Rao @ 2007-03-30 10:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: jblunck

The need for a unified/merged view of two or more filesystems/directories
has been felt for sometime now. Though a few out-of-the-kernel solutions
existed for this, it is only recently that the unionfs(1) solution has gone
into -mm. At the time of merging unionfs into -mm, a few questions were
raised about the appropriateness of having this namespace unification
feature as a separate stackable file system. Encouraged by this comment
from Andrew (http://lkml.org/lkml/2007/1/8/280) and also the interest about
unionfs in recently concluded Linux Storage and Filesystem Workshop(2),
I started looking into Jan Blunck's 2004 diploma thesis work where he had
implemented a VFS based union mount feature. Now Jan and I are working
towards moving this to latest kernel and bringing it to a stage that it
can posted as an RFC. While we are at it, we thought lets give a heads up
on our union mount effort and try to get some early feedbacks/opinions.

While unionfs implements a new filesystem and maintains a set
of VFS objects which stack the real VFS objects under them to get the
unification feature, union mount achieves the same stacking with
minimal (atleast conceptually minimal) changes at the VFS layer.

In union mount approach we maintain this stacking information in the
dentry structure. When a filesytem is union mounted on a mountpoint,
the dentry of the mount root would hold a reference to the mountpoint
dentry as an overlaid dentry and these two dentries together form
a union stack. Any subsequent readdir operation on this union mounted
dentry would work on the overlaid dentry also thereby providing the
merged view of the two filesystems.

Since the stacking information is maintained at the VFS layer, union
mount makes some heavy changes to the VFS lookup code and minor changes
to many VFS routines. Also the whiteout filetype is handled in kernel
and the physical filesytem is expected to support the new whiteout file type.
For copyup, we are right now using a hack of pipe/splice to get the
in-kernel file copy between two layers.

We are planning to post the RFC code pretty soon. More documentation
about the approach would accompany the code.

(1) Unionfs: http://www.filesystems.org/project-unionfs.html
(2) LWN article on LSF07: http://lwn.net/Articles/226351/

Regards,
Bharata.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Heads up on VFS based union mount
  2007-03-30 10:08 Heads up on VFS based union mount Bharata B Rao
@ 2007-03-30 19:04 ` Jan Engelhardt
  2007-03-31 11:09   ` Bharata B Rao
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Engelhardt @ 2007-03-30 19:04 UTC (permalink / raw)
  To: Bharata B Rao; +Cc: linux-kernel, jblunck


On Mar 30 2007 15:38, Bharata B Rao wrote:
>
>In union mount approach we maintain this stacking information in the 
>dentry structure. When a filesytem is union mounted on a mountpoint, 
>the dentry of the mount root would hold a reference to the mountpoint 
>dentry as an overlaid dentry and these two dentries together form a 
>union stack. Any subsequent readdir operation on this union mounted 
>dentry would work on the overlaid dentry also thereby providing the 
>merged view of the two filesystems.

What about whiteouts? (I cannot remember whether Jan Blunk's paper 
mentioned it at all.)



Jan
-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Heads up on VFS based union mount
  2007-03-30 19:04 ` Jan Engelhardt
@ 2007-03-31 11:09   ` Bharata B Rao
  0 siblings, 0 replies; 3+ messages in thread
From: Bharata B Rao @ 2007-03-31 11:09 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel, jblunck

On Fri, Mar 30, 2007 at 09:04:16PM +0200, Jan Engelhardt wrote:
> 
> On Mar 30 2007 15:38, Bharata B Rao wrote:
> >
> >In union mount approach we maintain this stacking information in the 
> >dentry structure. When a filesytem is union mounted on a mountpoint, 
> >the dentry of the mount root would hold a reference to the mountpoint 
> >dentry as an overlaid dentry and these two dentries together form a 
> >union stack. Any subsequent readdir operation on this union mounted 
> >dentry would work on the overlaid dentry also thereby providing the 
> >merged view of the two filesystems.
> 
> What about whiteouts? (I cannot remember whether Jan Blunk's paper 
> mentioned it at all.)

We do have whiteout support. And as I mentioned earlier, the underlying
filesystem needs to support the new 'whiteout' filetype. As of now it is
supported for ext2, ext3 and ramfs.

Regards,
Bharata.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-31 11:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-30 10:08 Heads up on VFS based union mount Bharata B Rao
2007-03-30 19:04 ` Jan Engelhardt
2007-03-31 11:09   ` Bharata B Rao

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).