linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Isaacson <adi@hexapodia.org>
To: Horst von Brand <vonbrand@inf.utfsm.cl>
Cc: "Jörn Engel" <joern@wohnheim.fh-wedel.de>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: unionfs
Date: Tue, 16 Mar 2004 13:03:46 -0600	[thread overview]
Message-ID: <20040316190346.GC20793@hexapodia.org> (raw)
In-Reply-To: <200403151922.i2FJMfIh004411@eeyore.valparaiso.cl>

Your "what are the semantics?" arguments are mysterious to me, Horst.  I
don't know that unionfs is a good idea, but there are trivial solutions
to the problems you suggest.  The fact that a facility can be used to
create untenable situations does not mean that the facility is useless.

On Mon, Mar 15, 2004 at 03:22:41PM -0400, Horst von Brand wrote:
> =?iso-8859-1?Q?J=F6rn?= Engel <joern@wohnheim.fh-wedel.de> said:
> > On Mon, 15 March 2004 22:35:20 +0800, Ian Kent wrote:
> > > I don't understand the requirement properly. Sorry.
> > Depends on who you ask, but imo it boils down to this:
> > - Use one filesystem as backing store, usually ro.
> > - Have another filesystem on top for extra functionality, usually rw
> >   access.
> > 
> > Famous example is a rw-CDROM, where writes go to hard drive and
> > unchanged data is read from CDROM.  But it makes sense for other
> > things as well.
> 
> And what if the underlying filesystem is RW too?

Only the topmost layer of a "union stack" should be RW.  If you manage
to write to an underlying FS, it is akin to writing to the block device
underlying a normal FS -- the behavior is undefined.

> What should happen if you unite several (>= 3) filesystems?  What if
> some are RO, others RW?

Given that only the topmost is RW, it Just Works.

> What do you do if a file shows up several times, each different?

The topmost entry wins.

> Assuming one RW on top of a RO only now: What should happen when a
> file/directory is missing from the top? If the bottom one "shows through",
> you can't delete anything; if it doesn't, you win nothing (because you will
> have to keep a complete copy RW on top).

If a directory entry is missing, the next lower layer is consulted.
Delete is implemented with "white-out" directory entries -- a directory
entry in the topmost FS which has special meaning, "return -ENOENT
immediately without consulting FSs underlying me".

> IIRC, this has been discussed a couple of times before, and the consensus
> each time was that it isn't /that hard/ to do, it is /hard or impossible/
> to find a sensible, simple semantics for this. The idea was then dropped...

The semantics of BSD unionfs are fairly well-defined and useful in at
least some circumstances.

References:

J. S. Pendry and M. K. McKusick.  Union mounts in 4.4BSD-Lite.
In Proceedings of the USENIX Technical Conference on UNIX and Advanced
Computing Systems, pages 25­33, December 1995.
http://www.usenix.org/publications/library/proceedings/neworl/full_papers/mckusick.a

-andy

  parent reply	other threads:[~2004-03-16 19:03 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-15 11:35 unionfs Carsten Otte
2004-03-15 12:19 ` unionfs Jörn Engel
2004-03-15 12:47   ` unionfs Ian Kent
2004-03-15 13:16     ` unionfs Jörn Engel
2004-03-15 14:35       ` unionfs Ian Kent
2004-03-15 16:13         ` unionfs Jörn Engel
2004-03-15 17:09           ` unionfs Claudio Martins
2004-03-15 19:22           ` unionfs Horst von Brand
2004-03-15 23:20             ` unionfs Chris Friesen
2004-03-16 16:04               ` unionfs Horst von Brand
2004-03-16 17:31                 ` unionfs Jörn Engel
2004-03-16 18:04                   ` unionfs Jörn Engel
2004-03-16 19:40                     ` unionfs Horst von Brand
2004-03-16 20:45                       ` unionfs Jörn Engel
2004-03-16 19:19                   ` unionfs Horst von Brand
2004-03-16 20:00                     ` unionfs Chris Friesen
2004-03-23  2:38                   ` unionfs Robert White
2004-03-15 23:52             ` unionfs Jörn Engel
2004-03-16 16:18               ` unionfs Horst von Brand
2004-03-16 17:10                 ` unionfs Jörn Engel
2004-03-19  9:11                   ` unionfs Jamie Lokier
2004-03-19  9:42                     ` unionfs Jörn Engel
2004-03-19  9:04                 ` unionfs Jamie Lokier
2004-03-16 19:03             ` Andy Isaacson [this message]
2004-03-15 14:37       ` unionfs Ian Kent
2004-03-15 16:15       ` unionfs Jörn Engel
  -- strict thread matches above, loose matches on Subject: below --
2004-03-08  9:52 unionfs Miklos Szeredi
2004-03-08 16:10 ` unionfs Bernd Schubert
2004-03-09  9:38   ` unionfs Miklos Szeredi
     [not found] ` <20040311151343.GA943@escher.cs.wm.edu>
2004-03-11 15:44   ` unionfs Miklos Szeredi
2004-03-14  2:33     ` unionfs Ian Kent
2004-03-14  4:20       ` unionfs Horst von Brand
2004-03-16 12:42       ` unionfs Miklos Szeredi
     [not found]     ` <20040315214207.GA26615@escher.cs.wm.edu>
2004-03-16 13:43       ` unionfs Miklos Szeredi
2004-03-12 23:37 ` unionfs Herbert Poetzl

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=20040316190346.GC20793@hexapodia.org \
    --to=adi@hexapodia.org \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vonbrand@inf.utfsm.cl \
    /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 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).