From: Jeff Layton <jeff.layton@primarydata.com>
To: "J. R. Okajima" <hooanon05g@gmail.com>
Cc: Dave Chinner <david@fromorbit.com>,
"J. Bruce Fields" <bfields@fieldses.org>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] dcache: return -ESTALE not -EBUSY on distributed fs race
Date: Fri, 19 Dec 2014 06:09:42 -0500 [thread overview]
Message-ID: <20141219060942.2bf613c2@tlielax.poochiereds.net> (raw)
In-Reply-To: <6944.1418957186@jrobl>
On Fri, 19 Dec 2014 11:46:26 +0900
"J. R. Okajima" <hooanon05g@gmail.com> wrote:
>
> Dave Chinner:
> > We use file handles on local filesystems. They have exactly the same
> > semantics as NFS file handles and so local filesystems have the same
> > ESTALE exposure as "distributed" filesystems to this problem. i.e:
>
> It is reasonable.
> But do you think ESTALE is good in case of __d_unalias()?
>
I don't think you'll ever see __d_unalias called on a local fs, as the
__d_find_any_alias call should always return NULL on a local fs.
With a local fs, we always know that the dcache is correct (which is
why local fs' generally don't supply a d_revalidate method). The only
way to get to __d_unalias is for all of the following to be true:
- you're splicing a new dentry into the tree
- that new dentry is a directory
- the inode for it already has a dentry associated with it that's in a
different place
...that can only happen in a remote filesystem. The only way for that
to occur on a local fs is for that fs to allow a directory to be
hardlinked, which should of course never happen.
As to whether ESTALE is as good as EBUSY there...I doubt it'll matter
much. Remote filesystems generally have to be able to cope with ESTALE
errors anyway, and I doubt a lot of userland code handles EBUSY
especially for this situation.
--
Jeff Layton <jlayton@primarydata.com>
next prev parent reply other threads:[~2014-12-19 11:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 19:59 [PATCH] dcache: return -ESTALE not -EBUSY on distributed fs race J. Bruce Fields
2014-12-17 20:01 ` J. Bruce Fields
2014-12-18 15:50 ` J. R. Okajima
2014-12-18 15:58 ` J. Bruce Fields
2014-12-18 16:27 ` J. R. Okajima
2014-12-18 17:32 ` Jeff Layton
2014-12-18 23:15 ` Dave Chinner
2014-12-19 2:46 ` J. R. Okajima
2014-12-19 11:09 ` Jeff Layton [this message]
2014-12-22 9:53 ` J. R. Okajima
-- strict thread matches above, loose matches on Subject: below --
2015-02-10 15:55 J. Bruce Fields
2015-02-18 15:03 ` J. Bruce Fields
2015-02-24 21:22 ` J. Bruce Fields
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=20141219060942.2bf613c2@tlielax.poochiereds.net \
--to=jeff.layton@primarydata.com \
--cc=bfields@fieldses.org \
--cc=david@fromorbit.com \
--cc=hooanon05g@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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