Re: [PATCH 20/41] union-mount: Introduce union_mount structure

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

 



On Mon, Nov 30, 2009 at 03:46:29AM -0500, Erez Zadok wrote:
> In message <1256152779-10054-21-git-send-email-vaurora@xxxxxxxxxx>, Valerie Aurora writes:
> > From: Jan Blunck <jblunck@xxxxxxx>
> > 
> > This patch adds the basic structures of VFS based union mounts. It is a new
> > implementation based on some of my old ideas that influenced Bharata B Rao
> > <bharata@xxxxxxxxxxxxxxxxxx> who came up with the proposal to let the
> > union_mount struct only point to the next layer in the union stack. I rewrote
> > nearly all of the central patches around lookup and the dcache interaction.
> > 
> > Advantages of the new implementation:
> > - the new union stack is no longer tied directly to one dentry
> > - the union stack enables dentries to be part of more than one union
> >   (bind mounts)
> > - it is unnecessary to traverse the union stack when de/referencing a dentry
> > - caching of union stack information still driven by dentry cache
> > 
> > XXX - is_unionized() is pretty heavy-weight for non-union file systems
> > on a union mount-enabled kernel.  May be simplified by assuming one or
> > more of:
> > 
> > - Two layers only
> > - One-to-one association between layers (doesn't union submounts)
> > - Writable layer mounted in only one place
> 
> Yes, is_unionized() does appear to be heavy.  Is it correct to assume that
> every such dentry will have gotten looked up or traversed as part of a
> union?  If so, can we just set a flag in the dentry to mark it as
> D_THIS_IS_PART_OF_A_UNION?  Even if you could, what happens when a union r-w
> layer is removed: could there be leftover dentries marked as part of a
> union, which are no longer really part of it?

dentries aren't themselves part of a unioned file system - they are
shared among all the mounts of a superblock/device. A dentry is
unioned or not only in the context of a particular mount.  So we can't
mark the dentry itself since it will be unioned in one mount (say,
/mnt/union) and not in another (/mnt/ro).  A dentry can be looked up
in another mount of one of the components of the union before the
union mount is created, so we can't mark a dentry at lookup anyway.

The vfsmount for the top layer <dentry,mnt> pair is marked with
MNT_UNION, but the vfsmount for the bottom layer is not.  I think we
could mark the lower vfsmount with a flag (probably not MNT_UNION but
MNT_UNION_LOWER or something like that) and check for that.  Al?  Jan?
Christoph?

-VAL
--
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