LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Peter Staubach <staubach@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-nfs@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Trond Myklebust <trond.myklebust@fys.uio.no>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 0/3] enhanced ESTALE error handling
Date: Fri, 18 Jan 2008 12:17:25 -0500	[thread overview]
Message-ID: <451AC300-674E-4DBE-869F-08A9184051B3@oracle.com> (raw)
In-Reply-To: <4790D9F3.2070503@redhat.com>

On Jan 18, 2008, at 11:55 AM, Peter Staubach wrote:
> Chuck Lever wrote:
>> Hi Peter-
>>
>> On Jan 18, 2008, at 10:35 AM, Peter Staubach wrote:
>>> Hi.
>>>
>>> Here is a patch set which modifies the system to enhance the
>>> ESTALE error handling for system calls which take pathnames
>>> as arguments.
>>
>> The VFS already handles ESTALE.
>>
>> If a pathname resolution encounters an ESTALE at any point, the  
>> resolution is restarted exactly once, and an additional flag is  
>> passed to the file system during each lookup that forces each  
>> component in the path to be revalidated on the server.  This has  
>> no possibility of causing an infinite loop.
>>
>> Is there some part of this logic that is no longer working?
>
> The VFS does not fully handle ESTALE.  An ESTALE error can occur
> during the second pathname resolution attempt.

If an ESTALE occurs during the second resolution attempt, we should  
give up.  When I addressed this issue two years ago, the two-try  
logic was the only acceptable solution because there's no way to  
guarantee the pathname resolution will ever finish unless we put a  
hard limit on it.

> There are lots of
> reasons, some of which are the 1 second resolution from some file
> systems on the server

Which is a server bug, AFAICS.  It's simply impossible to close all  
the windows that result from sloppy file time stamps without  
completely disabling client-side caching.  The NFS protocol relies on  
file time stamps to manage cache coherence.  If the server is lying  
about time stamps, there's no way the client can cache coherently.

> and the window in between the revalidation
> and the actual use of the file handle associated with each
> dentry/inode pair.

A use case or two would be useful to explore (on linux-nfs or linux- 
fsdevel, rather than lkml).

> Also, there was no support for ESTALE errors which occur during
> subsequent operations to the pathname resolution process.  For
> example, during a mkdir(2) operation, the ESTALE can occur from
> the over the wire MKDIR operation after the LOOKUP operations
> have all succeeded.

If the final operation fails after a pathname resolution, then it's a  
real error.  Is there a fixed and valid recovery script for the  
client in this case that will allow the mkdir to proceed?

Admittedly, the NFS client could recover more cleanly from some of  
these problems, but given the architecture of the Linux VFS, it will  
be difficult to address some of the corner cases.

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com

  reply	other threads:[~2008-01-18 17:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18 15:35 Peter Staubach
2008-01-18 15:46 ` J. Bruce Fields
2008-01-18 16:41 ` Chuck Lever
2008-01-18 16:55   ` Peter Staubach
2008-01-18 17:17     ` Chuck Lever [this message]
2008-01-18 17:30       ` Peter Staubach
2008-01-18 17:52         ` Chuck Lever
2008-01-18 18:12           ` Peter Staubach
2008-01-18 18:37             ` J. Bruce Fields
2008-01-18 19:12               ` Peter Staubach
2008-01-18 18:17         ` Chuck Lever
2008-02-01 20:57 ` [PATCH 0/3] enhanced ESTALE error handling (v2) Peter Staubach
2008-03-10 20:23   ` [PATCH 0/3] enhanced ESTALE error handling (v3) Peter Staubach
2008-03-10 22:42     ` Andreas Dilger

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=451AC300-674E-4DBE-869F-08A9184051B3@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=staubach@redhat.com \
    --cc=trond.myklebust@fys.uio.no \
    --subject='Re: [PATCH 0/3] enhanced ESTALE error handling' \
    /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

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).