public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Hans de Bruin <jmdebruin@xmsnet.nl>
Cc: "linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-nfs@vger.kernel.org
Subject: Re: 3.17.0+ files disappearing after playing old dos game on nfsroot laptop
Date: Thu, 30 Apr 2015 23:35:18 -0500	[thread overview]
Message-ID: <87pp6kewzd.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <544C1E40.6070901@xmsnet.nl> (Hans de Bruin's message of "Sun, 26 Oct 2014 00:03:44 +0200")

Hans de Bruin <jmdebruin@xmsnet.nl> writes:

>> I expect what needs to happen is to confirm that nfs directory entry
>> revalidation is buggy, and at least for the short term re-add the nfs
>> logic that will avoid dropping a dentry if it is a mount point, or
>> path to a mount point, to avoid the nfs bugs.
>>
>
> ok, I will go in waiting mode.

I dropped the ball on this but it looks like someone else hit the
problem and the following two commits fixed this issue:

Can you confirm that things are working again?

commit fa9233699cc1dc236f4cf42245d13e40966938c5
Author: Trond Myklebust <trond.myklebust@primarydata.com>
Date:   Mon Feb 23 18:51:32 2015 -0500

    NFS: Don't require a filehandle to refresh the inode in nfs_prime_dcache()
    
    If the server does not return a valid set of attributes that we can
    use to either create a file or refresh the inode, then there is no
    value in calling nfs_prime_dcache().
    
    However if we're just refreshing the inode using the attributes that
    the server returned, then it shouldn't matter whether or not we have
    a filehandle, as long as we check the fsid+fileid combination.
    
    Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>

commit 6c441c254eea2354d686be7f5544bcd79fb6a61f
Author: Trond Myklebust <trond.myklebust@primarydata.com>
Date:   Sun Feb 22 16:35:36 2015 -0500

    NFS: Don't invalidate a submounted dentry in nfs_prime_dcache()
    
    If we're traversing a directory which contains a submounted filesystem,
    or one that has a referral, the NFS server that is processing the READDIR
    request will often return information for the underlying (mounted-on)
    directory. It may, or may not, also return filehandle information.
    
    If this happens, and the lookup in nfs_prime_dcache() returns the
    dentry for the submounted directory, the filehandle comparison will
    fail, and we call d_invalidate(). Post-commit 8ed936b5671bf
    ("vfs: Lazily remove mounts on unlinked files and directories."), this
    means the entire subtree is unmounted.
    
    The following minimal patch addresses this problem by punting on
    the invalidation if there is a submount.
    
    Kudos to Neil Brown <neilb@suse.de> for having tracked down this
    issue (see link).
    
    Reported-by: Nix <nix@esperi.org.uk>
    Link: http://lkml.kernel.org/r/87iofju9ht.fsf@spindle.srvr.nix
    Cc: stable@vger.kernel.org # 3.18+
    Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>


  reply	other threads:[~2015-05-01  4:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 20:00 3.17.0+ files disappearing after playing old dos game on nfsroot laptop Hans de Bruin
2014-10-19 17:32 ` Hans de Bruin
2014-10-24 16:07   ` Hans de Bruin
2014-10-24 16:25     ` Hans de Bruin
2014-10-24 18:18       ` Eric W. Biederman
2014-10-25 10:38         ` Hans de Bruin
2014-10-25 14:55           ` Eric W. Biederman
2014-10-25 22:03             ` Hans de Bruin
2015-05-01  4:35               ` Eric W. Biederman [this message]
2015-05-01 11:40                 ` Hans de Bruin
2015-05-01 21:45                   ` Eric W. Biederman

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=87pp6kewzd.fsf@x220.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=jmdebruin@xmsnet.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@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