linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	Miklos Szeredi <mszeredi@redhat.com>,
	overlayfs <linux-unionfs@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 4/4] ovl: alllow remote upper
Date: Tue, 4 Feb 2020 13:42:21 -0500	[thread overview]
Message-ID: <20200204184221.GA24566@redhat.com> (raw)
In-Reply-To: <CAOQ4uxj_pVp9-EN2Gmq9j6G3xozzpK_zQiRO-brx6PZ9VpgD0Q@mail.gmail.com>

On Tue, Feb 04, 2020 at 07:02:05PM +0200, Amir Goldstein wrote:
> On Tue, Feb 4, 2020 at 6:17 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
> >
> > On Tue, Feb 4, 2020 at 3:59 PM Vivek Goyal <vgoyal@redhat.com> wrote:
> > >
> > > On Fri, Jan 31, 2020 at 12:50:04PM +0100, Miklos Szeredi wrote:
> > > > No reason to prevent upper layer being a remote filesystem.  Do the
> > > > revalidation in that case, just as we already do for lower layers.
> > > >
> > > > This lets virtiofs be used as upper layer, which appears to be a real use
> > > > case.
> > >
> > > Hi Miklos,
> > >
> > > I have couple of very basic questions.
> > >
> > > - So with this change, we will allow NFS to be upper layer also?
> >
> > I haven't tested, but I think it will fail on the d_type test.
> 
> But we do not fail mount on no d_type support...
> Besides, I though you were going to add the RENAME_WHITEOUT
> test to avert untested network fs as upper.
> 
> >
> > > - What does revalidation on lower/upper mean? Does that mean that
> > >   lower/upper can now change underneath overlayfs and overlayfs will
> > >   cope with it.
> >
> > No, that's a more complicated thing.  Especially with redirected
> > layers (i.e. revalidating a redirect actually means revalidating all
> > the path components of that redirect).
> >
> > > If we still expect underlying layers not to change, then
> > >   what's the point of calling ->revalidate().
> >
> > That's a good question; I guess because that's what the filesystem
> > expects.  OTOH, it's probably unnecessary in most cases, since the
> > path could come from an open file descriptor, in which case the vfs
> > will not do any revalidation on that path.
> >
> 
> Note that ovl_dentry_revalidate() never returns 0 and therefore, vfs
> will never actually redo the lookup, but instead return -ESTALE
> to userspace. Right? This makes some sense considering that underlying
> layers are not expected to change.
> 
> The question is, with virtiofs, can we know that the server/host will not
> invalidate entries?

I don't think virtiofs will ensure that server/host will not invalidate
entries. It will be more of a configuration thing where we will expect
users to configure things in such a way that shared directory does not
change.

So that means, if user does not configure it properly and things change
unexpectedly, then overlayfs should be able to detect it and flag error
to user space?

> And if it does, should it cause a permanent error
> in overlayfs or a transient error? If we do not want a permanent error,
> then ->revalidate() needs to be called to invalidate the overlay dentry. No?

So as of now user space will get -ESTALE and that will get cleared when
user space retries after corresponding ovl dentry has been dropped from
cache (either dentry is evicted, cache is cleared forcibly or overlayfs
is remounted)? If yes, that kind of makes sense. Overlay does not expect
underlying layers to change and if a change it detected it is flagged
to user space (and overlayfs does not try to fix it)?

Thanks
Vivek


  reply	other threads:[~2020-02-04 18:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31 11:50 [PATCH 0/4] ovl: allow virtiofs as upper Miklos Szeredi
2020-01-31 11:50 ` [PATCH 1/4] ovl: restructure dentry revalidation Miklos Szeredi
2020-01-31 11:50 ` [PATCH 2/4] ovl: separate detection of remote upper layer from stacked overlay Miklos Szeredi
2020-01-31 11:50 ` [PATCH 3/4] ovl: decide if revalidate needed on a per-dentry bases Miklos Szeredi
2020-01-31 14:53   ` Amir Goldstein
2020-01-31 15:15     ` Miklos Szeredi
2020-01-31 11:50 ` [PATCH 4/4] ovl: alllow remote upper Miklos Szeredi
2020-01-31 15:29   ` Amir Goldstein
2020-01-31 15:38     ` Miklos Szeredi
2020-01-31 15:50       ` Amir Goldstein
2020-01-31 16:05         ` Miklos Szeredi
2020-02-04 14:59   ` Vivek Goyal
2020-02-04 16:16     ` Miklos Szeredi
2020-02-04 17:02       ` Amir Goldstein
2020-02-04 18:42         ` Vivek Goyal [this message]
2020-02-04 19:11           ` Amir Goldstein
2020-02-04 19:16             ` Miklos Szeredi
2020-02-20  7:52         ` Amir Goldstein
2020-02-20 20:00           ` Amir Goldstein
2020-03-14 13:16             ` Amir Goldstein
2020-03-16 17:54               ` Vivek Goyal
2020-03-16 19:02                 ` Amir Goldstein
2020-03-16 19:40                   ` Vivek Goyal
2020-03-18 13:36                   ` unionmount testsuite with upper virtiofs Amir Goldstein
2020-03-19 21:40                     ` Vivek Goyal

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=20200204184221.GA24566@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mszeredi@redhat.com \
    /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).