All of lore.kernel.org
 help / color / mirror / Atom feed
* More questions on unionmount
@ 2011-05-12 18:10 David Howells
  2011-05-13 13:54 ` David Howells
  2011-05-13 23:51 ` Valerie Aurora
  0 siblings, 2 replies; 4+ messages in thread
From: David Howells @ 2011-05-12 18:10 UTC (permalink / raw)
  To: Valerie Aurora, viro; +Cc: dhowells, linux-fsdevel


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

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

end of thread, other threads:[~2011-05-13 23:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-12 18:10 More questions on unionmount David Howells
2011-05-13 13:54 ` David Howells
2011-05-13 23:58   ` Valerie Aurora
2011-05-13 23:51 ` Valerie Aurora

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.