More questions on unionmount

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

 



Okay, I'm definitely getting the hang of how this works.  I like the way you
can just blat it over a pile of co-rooted R/O mounts and it will use all of
them as sources, in reverse order of mounting.  However...

/**
 * build_root_union - Create the union stack for the root dir
 * @topmost_mnt - vfsmount of topmost mount
 *
 * Build the union stack for the root dir.  Annoyingly, we have to traverse
 * union "up" from the root of the cloned tree to find the topmost read-only
 * mount, and then traverse back "down" to build the stack.

Why?

Shouldn't you just start from the mount at the top of the pile and work
upwards through mnt_parent?  If the mount in the pile is not R/O, then you
can't include it, right?  Surely, it would make most sense to just give an
error if the mount on which you're going to mount directly (and so is at the
top of the pile) is _not_ R/O...  We might even go as far as to say that any
R/W mount in the pile is grounds for rejecting the union mount.

As it is, you don't include _all_ R/O mounts in the stack - merely that slice
of them that is the uppermost contiguous set of R/O mounts.

That way it's least surprising to people who try to do it wrong.  If they try
to throw a R/W mount in there, they get an error and a line in dmesg.

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