linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>
Subject: Re: [GIT PULL] overlayfs update for 4.14
Date: Fri, 15 Sep 2017 11:35:25 -0700	[thread overview]
Message-ID: <CA+55aFznOnFvOPghB2RWqx-H6n0Fc8zGy8c24zU-aYPVscvufQ@mail.gmail.com> (raw)
In-Reply-To: <20170915073226.GC19278@veci.piliscsaba.szeredi.hu>

On Fri, Sep 15, 2017 at 12:32 AM, Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> Fine.  Here's a patch reverting the new flags and adding O_UPPER.

Thanks, this patch looks fine to me, but now with the other discussion
I think I'll leave the d_real() thing alone and see if Al has more
comments about your other approach.

Because it _would_ be even more lovely if we could just get rid of it
entirely, and do all of this internally in ovlfs itself.

> And we still have that issue with an fd opened for read-only and then
> one opened for write, resulting in a copy-up, modification, and the
> read-only fd still seeing the old data (union mounts had the same
> issue, BTW).   So we need more hacks or some way to have a shared page
> cache that's breakable on copy up, which does not look trivial at all.

Ugh, no, that's *very* non-trivial.

I can see us doing magical things with the inode->i_mapping being an
ovlfs-private mapping, and then sharing the actual physical pages with
the mapping of the lower filesystem.

So that way, the actual file data would never point directly at the
lower filesystem.

But equally obviously, that would *only* work when the lower
filesystem is never modified directly. There may be other, even worse,
issues with page sharing across mappings.  So it might be a completely
broken model, I haven't thought much about it.

                 Linus

  parent reply	other threads:[~2017-09-15 18:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 14:05 [GIT PULL] overlayfs update for 4.14 Miklos Szeredi
2017-09-13 16:25 ` Linus Torvalds
2017-09-14  6:46   ` Miklos Szeredi
2017-09-14 20:00     ` Linus Torvalds
2017-09-14 20:12       ` Miklos Szeredi
2017-09-14 20:24         ` Linus Torvalds
2017-09-15  7:32           ` Miklos Szeredi
2017-09-15  8:06             ` Miklos Szeredi
2017-09-17 21:27               ` Dave Chinner
2017-09-15 18:35             ` Linus Torvalds [this message]
2017-09-17 14:38       ` J. R. Okajima

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=CA+55aFznOnFvOPghB2RWqx-H6n0Fc8zGy8c24zU-aYPVscvufQ@mail.gmail.com \
    --to=torvalds@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --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 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).