From: "J. Bruce Fields" <bfields@redhat.com>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Cc: Sachin Prabhu <sprabhu@redhat.com>,
Linux NFS mailing list <linux-nfs@vger.kernel.org>,
"jlayton@redhat.com" <jlayton@redhat.com>,
steved <steved@redhat.com>
Subject: Re: ESTALE errors: What can be done to handle this problem.
Date: Tue, 10 Apr 2012 15:01:27 -0400 [thread overview]
Message-ID: <20120410190127.GA32661@pad.fieldses.org> (raw)
In-Reply-To: <1334077062.19865.21.camel@lade.trondhjem.org>
On Tue, Apr 10, 2012 at 04:57:42PM +0000, Myklebust, Trond wrote:
> Handling ESTALE still doesn't guarantee that you can make progress.
> Remove the 'sleep 3' above, and you can theoretically find yourself
> replaying lookups until the cows come home while that 'stat()' call
> continues to return ESTALE.
> The bottom line is that NFS is not safe in situations such as the above,
By the way, what precisely are the "situations such as the above"? Or
put in another way, what are the rules users need to know?
("Operations on paths affected by a directory-modifying operation should
not be attempted until after sufficient time has passed for the lookup
cache to time out"? No, it should be a weaker rule than that.)
> since we don't have the kind of locking required to guarantee that
> LOOKUP + GETATTR can be done atomically.
Though all we actually need is a way to hold a temporary reference on
the looked up filehandle. In theory that wouldn't be hard to add?:
- Clarify that current and saved filehandles shouldn't go stale
during the lifetime of a compound.
- If we also need to hold filehandle references across
compounds, introduce new operations for that (and make the
references part of the client's leased state)
--b.
>
> > Is this approach feasible? If not, what else can be done to avoid this
> > problem.
>
> If you have workloads such as the above, then I suggest "mount
> -olookupcache=none". It still won't prevent ESTALE, but at least you
> ensure that the dentry revalidation always does a full lookup.
>
> Otherwise, you can do as Jeff suggested: handle the ESTALE at the VFS
> level, but ensure that you break out of the loop after a limited number
> of attempts has been made.
>
> --
> Trond Myklebust
> Linux NFS client maintainer
>
> NetApp
> Trond.Myklebust@netapp.com
> www.netapp.com
>
next prev parent reply other threads:[~2012-04-10 19:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 16:03 ESTALE errors: What can be done to handle this problem Sachin Prabhu
2012-04-10 16:11 ` Jeff Layton
2012-04-10 16:11 ` Jeff Layton
2012-04-10 16:57 ` Myklebust, Trond
2012-04-10 19:01 ` J. Bruce Fields [this message]
2012-04-10 19:59 ` Peter Staubach
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=20120410190127.GA32661@pad.fieldses.org \
--to=bfields@redhat.com \
--cc=Trond.Myklebust@netapp.com \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=sprabhu@redhat.com \
--cc=steved@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.