linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Oleg Drokin <green@linuxhacker.ru>
Cc: "<linux-fsdevel@vger.kernel.org>" <linux-fsdevel@vger.kernel.org>,
	Trond Myklebust <trondmy@primarydata.com>,
	List Linux NFS Mailing <linux-nfs@vger.kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: Revalidate failure leads to unmount
Date: Tue, 6 Dec 2016 02:03:01 +0000	[thread overview]
Message-ID: <20161206020301.GA22740@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20161206020059.GL1555@ZenIV.linux.org.uk>

[gyah - Eric's old address used by mistake; resent with the right address]

On Mon, Dec 05, 2016 at 08:39:15PM -0500, Oleg Drokin wrote:
> >   Basically it all started with mountpoints randomly getting unmounted during
> >   testing that I could not quite explain (see my quoted message at the end).
> > 
> >   Now I finally caught the culprit and it's lookup_dcache calling d_invalidate
> >   that in turn detaches all mountpoints on the entire subtree like this:

Yes, it does.

> >   While I imagine the original idea was "cannot revalidate? Nuke the whole
> >   tree from orbit", cases for "Why cannot we revalidate" were not considered.

What would you do instead?

> >   So this brings up the question:
> >   Is revalidate really required to go to great lengths to avoid returning 0
> >   unless the underlying name has really-really changed? My reading
> >   of documentation does not seem to match this as the whole LOOKUP_REVAL logic
> >   is then redundant more or less?

LOOKUP_REVAL is about avoiding false _postives_ on revalidation - i.e. if
you have several layers of actually stale entries in dcache and notice only
when you try to do lookup in the last one, with server telling you to fuck
off, your only hope is to apply full-strength revalidation from the very
beginning.  Again, the problem it tries to avoid is over-optimistic fs
assuming that directories are valid without asking the server.

> >   Or is totally nuking the whole underlying tree a little bit over the top and
> >   could be replaced with something less drastic, after all following re-lookup
> >   could restore the dentries, but unmounts are not really reversible.

Like what?  Seriously, what would you do in such situation?  Leave the
damn thing unreachable (and thus impossible to unmount)?  Suppose the
/mnt/foo really had been removed (along with everything under it) on
the server.  You had something mounted on /mnt/foo/bar/baz; what should
the kernel do?

  reply	other threads:[~2016-12-06  2:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <37A073FB-726E-4AF8-BC61-0DFBA6C51BD7@linuxhacker.ru>
2016-09-20  1:44 ` Revalidate failure leads to unmount (was: Mountpoints disappearing from namespace unexpectedly.) Oleg Drokin
2016-12-06  1:39   ` Revalidate failure leads to unmount Oleg Drokin
2016-12-06  2:00     ` Al Viro
2016-12-06  2:03       ` Al Viro [this message]
2016-12-06  2:22       ` Oleg Drokin
2016-12-06  5:02         ` Al Viro
2016-12-06  5:45           ` Oleg Drokin
2016-12-06  6:17             ` Al Viro
2016-12-06  6:46               ` Oleg Drokin
2016-12-08  5:01               ` Oleg Drokin

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=20161206020301.GA22740@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=ebiederm@xmission.com \
    --cc=green@linuxhacker.ru \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@primarydata.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).