public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Erez Zadok <ezk@cs.sunysb.edu>
Cc: Jamie Lokier <jamie@shareable.org>,
	Phillip Lougher <phillip@lougher.demon.co.uk>,
	David Newall <davidn@davidnewall.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	hch@lst.de
Subject: Re: [RFC 0/7] [RFC] cramfs: fake write support
Date: Mon, 2 Jun 2008 09:51:26 +0200	[thread overview]
Message-ID: <200806020951.26868.arnd@arndb.de> (raw)
In-Reply-To: <200806020325.m523Pqsq025740@agora.fsl.cs.sunysb.edu>

On Monday 02 June 2008, Erez Zadok wrote:
> Correction: Unionfs doesn't make additional copies in the page cache.

Ok, I must have misunderstood something there. Sorry about that.

> Arnd, I favor a more generic approach, one that will work with the vast
> majority of file systems that people use w/ unioning, preferably all of
> them.  Supporting copy-on-write in cramfs will only help a small subset of
> users.  Yes, it might be simple, but I fear it won't be useful enough to
> convince existing users of unioning to switch over.  And I don't think we
> should add CoW support in every file system -- the complexity will be much
> more than using unionfs or some other VFS-based solution.

My idea was to have it in cramfs, squashfs and iso9660 at most, I agree
that doing it in even a single writable file system would add far too
much complexity. I did not mean to start a fundamental discussion about
how to do it the right way, just noticed that there are half a dozen
implementations that have been around for years without getting close to
inclusion in the mainline kernel, while a much simpler approach gives
you sane semantics for a subset of users.

> I can see some advantages (re: cache coherency) by hacking CoW support
> directly into a f/s.  If you want to use a filesystem-specific solution,
> then I suggest you don't modify a file system used as a source in a union,
> but one used as a destination.  You'll have better overage that way.  The
> vast majority of times, unionfs users will either write to tmpfs or ext2;
> but the source readonly f/s can be a lot of different ones (most popular are
> ext*, nfs*, isofs, and cramfs/squashfs).

Yes, that absolutely makes sense. I don't care much about a persistant
storage for the overlay, so tmpfs (if not ramfs) should be the only place
to do it in. It does introduce some of the same old problems though,
because you could still write to a bind mounted copy of the underlying
file system (unlike cramfs, which is guaranteed to be read-only), which
forces you to either to a full copy-up, or can result in inconsistent
file contents. Also, stacking multiple union-tmpfs copies on top of each
other would be hard to do without the potential to overflow the kernel
stack.

I'll probably try implementing a '-o union' option tmpfs anyway, just
to see how hard it is and what the problems are.

> I find it somewhat ironic to hear the argument that "union mounts isn't
> stable yet, so lets come up with a new solution inside cramfs."  Why should
> your solution become stable much faster than union mounts (which also had
> patches floating around for a long time already).

Because the patches are not trying to solve any of the hard problems at all:
Persistent storage of overlays, readdir traversal through more than two
layers, stable inode numbers, opening a file through two different overlays,
copyup, and so on. I'm sure you know more about these problems that I do,
but as long as I don't have to care about them, I don't see a problem
with my patches (other than the bugs I already described).

> If you have cycles to spare, why not help Bharata and Jan?

I spent a lot of time on discussing the initial implementation with Jan
years ago, and will keep reviewing their patches, but I have neither the
time nor the brains to really contribute much to them. As you mentioned
in your reply to Jan E., it's on an entirely different scale than doing
a small hack to cramfs or tmpfs.

	Arnd <><

  reply	other threads:[~2008-06-02  7:52 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-31 15:37 [RFC 0/7] [RFC] cramfs: fake write support arnd
2008-05-31 18:56 ` David Newall
2008-05-31 20:40   ` Arnd Bergmann
2008-06-01  3:54     ` Phillip Lougher
2008-06-01  8:52       ` Arnd Bergmann
2008-06-01 12:28       ` Jamie Lokier
2008-06-01 21:49         ` Arnd Bergmann
2008-06-02  2:48           ` hooanon05
2008-06-02  3:25             ` Erez Zadok
2008-06-02  7:51               ` Arnd Bergmann [this message]
2008-06-02 18:13                 ` Erez Zadok
2008-06-03  2:02                   ` Phillip Lougher
2008-06-02  3:51             ` Erez Zadok
2008-06-02 11:07               ` Jamie Lokier
2008-06-02  4:37             ` Erez Zadok
2008-06-02  6:07               ` Bharata B Rao
2008-06-02  7:17               ` Jan Engelhardt
2008-06-02  7:12             ` Arnd Bergmann
2008-06-02 10:36               ` hooanon05
2008-06-02 11:15                 ` Arnd Bergmann
2008-06-02 12:56                   ` hooanon05
2008-06-02 14:13                     ` Arnd Bergmann
2008-06-02 14:33                       ` hooanon05
2008-06-02 15:01                         ` Arnd Bergmann
2008-06-03 11:04                           ` hooanon05
2008-06-02 14:54                   ` Evgeniy Polyakov
2008-06-02 17:42                     ` Arnd Bergmann
2008-06-02 15:35               ` Erez Zadok
2008-06-01  6:02     ` David Newall
2008-06-01  9:11       ` Jan Engelhardt
2008-06-01 16:25       ` Jörn Engel
2008-06-01  3:19 ` Phillip Lougher

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=200806020951.26868.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=davidn@davidnewall.com \
    --cc=ezk@cs.sunysb.edu \
    --cc=hch@lst.de \
    --cc=jamie@shareable.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillip@lougher.demon.co.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox