From: Horst von Brand <vonbrand@inf.utfsm.cl>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: unionfs
Date: Tue, 16 Mar 2004 15:40:24 -0400 [thread overview]
Message-ID: <200403161940.i2GJeP6m007930@eeyore.valparaiso.cl> (raw)
In-Reply-To: Your message of "Tue, 16 Mar 2004 19:04:13 +0100." <20040316180413.GA22482@wohnheim.fh-wedel.de>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4202 bytes --]
=?iso-8859-1?Q?J=F6rn?= Engel <joern@wohnheim.fh-wedel.de> said:
> On Tue, 16 March 2004 18:31:47 +0100, Jörn Engel wrote:
> > On Tue, 16 March 2004 12:04:30 -0400, Horst von Brand wrote:
> > >
> > > What happens if I mount the live 2.6.4 kernel source over a CD containing
> > > 2.5.30? What happens to identical files, files that moved, changed files,
> > > deleted files? Pray tell, how does the kernel find out which is which?
> >
> > What happens if I write to /dev/hda while having my rootfs /dev/hda1?
> > Bad things, damn right. But why would anyone do that?
>
> There is really no point to this discussion, as it looks like a big
> misunderstanding. Maybe you object less if you see the design:
>
> Variant 1 (just a single filesystem):
>
> - Introduce a new variant of links, which I call COW.
> - COWs can only link to hidden inodes.
> - Hidden inodes cannot be accessed directly.
> - COWs look like regular files to userspace.
> - Read access to COWs goes to the hidden inode.
> - Write access to COWs copies the hidden inode before writing to it.
> - Copying file1 to file2 does four things:
> - Create a new hidden inode.
> - Move data from file1 to hidden inode.
> - Turn file1 into COW and link to hidden inode.
> - Create COW for file2 and link to hidden inode.
Looks an awful lot like symlinks...
> There are some more special cases, but this is basically it. So let's
> use the stuff a little:
>
> $ cp -cr dir1 dir2
>
> Behaves similar to 'cp -lr', but creates COWs instead of hard links.
> Can take a few seconds to create the directories, but not minutes.
Why does it magically take less time? The work done (recursing, fiddling
with directories, syscalls, ...) is nearly the same.
> $ vi dir2/bunch*of*files
>
> Writing to those files makes a real copy for each. dir1/* remains
> unaffected, no matter how careless you are. We've made it foolproof,
> so the universe has to create greater fools again, right?
Just do it again, thinking _these_ versions are the ones safe from
fat-fingering...
> $ rm -rf dir2
>
> Scraps one of the copies along with all modifications. dir1/* remains
> unaffected gain.
>
> $ cp -cr /fs1/dir1 /fs2/dir2
>
> Fails, since links between different filesystems don't work.
Why?
How do you push changes back if needed? How do you get back the version 3
changes back? Oops, can't do...
You do want version control.
> Variant 2 (across multiple filesystems now):
>
> - COWs contain a filesystem identifier as well.
> - Accessing COWs linking to unavaillable filesystems returns -E...
> Alternatively:
> - Mounting such an fs fails, unless all links work.
>
> Usage is as above.
>
> $ mkfs /dev/fs2
> $ mount /dev/fs2 /fs2
> $ cp -cr /fs1 /fs2
>
> Creates an identical copy of one filesystem on another one. fs2 has
> to support COWs and fs2 has to be RO or support COWs. A rw-fs mounted
> ro means trouble, as you know.
>
This is just one filesystem. Where are the others?
> Maybe I'm just stupid and missed some important detail, but this
> design looks like it can solve a bunch of problems. Do you still
> think, it is useless?
I still think there are much better solutions to the problems you mention.
What I'd love to see is something like, say /usr for each package (complete
with binaries in /usr/bin/, manuals in /usr/share/man/, ...) that you can
mount together in any combination wanted (even per-user, a la Plan 9) over
/usr and have it fully populated. But that gets horribly messy when you
want files from different versions (say, I've got an overlay for vi(1) that
fixes a horrible bug, but the manual is in Czech, and I prefer English) to
show up on top, or have files one on top of the other (source code
versions?) and you delete/modify/move the top one. What happens then? If
you can't come up with a sensible interpretation of Unix file operations in
this scenario (and you can't, trust me), the idea is doomed.
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
next prev parent reply other threads:[~2004-03-16 19:41 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 ` Horst von Brand [this message]
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 ` unionfs Andy Isaacson
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=200403161940.i2GJeP6m007930@eeyore.valparaiso.cl \
--to=vonbrand@inf.utfsm.cl \
--cc=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®