All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Valerie Aurora <valerie.aurora@gmail.com>, viro@zeniv.linux.org.uk
Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org
Subject: More questions on unionmount
Date: Thu, 12 May 2011 19:10:21 +0100	[thread overview]
Message-ID: <25449.1305223821@redhat.com> (raw)


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

             reply	other threads:[~2011-05-12 18:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12 18:10 David Howells [this message]
2011-05-13 13:54 ` More questions on unionmount David Howells
2011-05-13 23:58   ` Valerie Aurora
2011-05-13 23:51 ` Valerie Aurora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25449.1305223821@redhat.com \
    --to=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=valerie.aurora@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.