From: Hugh Dickins <hughd@google.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>
Cc: Hugh Dickins <hughd@google.com>,
Dominique Martinet <asmadeus@codewreck.org>,
"J. Bruce Fields" <bfields@fieldses.org>,
Dominique Martinet <dominique.martinet@cea.fr>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
David Howells <dhowells@redhat.com>
Subject: Re: [git pull] vfs.git spurious ENOTDIR fix
Date: Sun, 2 Aug 2015 11:53:16 -0700 (PDT) [thread overview]
Message-ID: <alpine.LSU.2.11.1508021132350.19898@eggly.anvils> (raw)
In-Reply-To: <CA+55aFyXeQED3ZKNshynHQ8uEKF71pST21EzamJwoLvCX4R_5w@mail.gmail.com>
On Sat, 1 Aug 2015, Linus Torvalds wrote:
> On Sat, Aug 1, 2015 at 9:06 PM, Hugh Dickins <hughd@google.com> wrote:
> >
> > (I don't actually understand why the clearing of DCACHE_ENTRY_TYPE in
> > dentry_iput() is not of continuing concern; but don't worry, there's
> > plenty I don't understand - so long as you're both satisfied that
> > it's not a concern, no need to persuade me.)
>
> So dentry_iput() is only called as the dentry is being thrown away,
> and is stale.
>
> Yes, such a stale dentry can be seen by an RCU lookup, but the RCU
> lookups should always revalidate things after the lookup, so it
> shouldn't matter. The problem here was that there was a missing
> revalidate of the RCU lookup for an error case, so the error that
> _should_ have been a harmless race that got handled later by the
> proper validation instead turned into a real user-visible error.
Thank you both for leading me through that: I really should have
rechecked the sequence count invalidation in the source for myself
(I had a wrong picture of it in my head), before inserting that
parenthesis and taking your time over it; but had been in a hurry
to get a response back.
>
> But we didn't use to clear the flags in dentry_iput, so before things
> generally "happened to work" anyway, because this rare error case
> didn't actually ever trigger in the first place.
>
> (And I still don't think we necessarily *should* clear the flags in
> dentry_iput(), but it really shouldn't be a correctness issue)
>
> > Do we have any idea why a bug introduced in v3.13 should only now
> > stand out, both for Dominique and for me? Has the RCU lookup somehow
> > become much more effective recently?
>
> So I do think that the clearing of the dentry flags exposed a
> situation that was harder to hit before.
Right, that does indeed make sense of why it appeared now.
I cannot actually report success from yesterday's testing, since
it hung after 20 hours for, I believe, the same unrelated reason
that I ran into before.
I mentioned jbd2 last time, but I doubt that's at fault: it's almost
certainly an issue with recent vmscan changes and/or recent loop
changes - the business of page reclaim waiting on page writeback
has always been tricky and fragile and deadlock-prone, the more
so when loop is involved: probably the balance has got shifted
slightly by recent changes, I'll look into it (but definitely
not rc5 material).
Thanks,
Hugh
next prev parent reply other threads:[~2015-08-02 18:54 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 17:46 v4.2-rc dcache regression, probably 75a6f82a0d10 Hugh Dickins
2015-07-31 17:59 ` Dominique Martinet
2015-07-31 18:00 ` J. Bruce Fields
2015-07-31 18:42 ` Linus Torvalds
2015-07-31 19:42 ` Hugh Dickins
2015-07-31 20:50 ` Dominique Martinet
2015-07-31 22:52 ` Linus Torvalds
2015-08-01 0:20 ` Hugh Dickins
2015-08-01 5:58 ` Dominique Martinet
2015-08-01 7:26 ` Al Viro
2015-08-01 10:19 ` Dominique Martinet
2015-08-01 10:50 ` Dominique Martinet
2015-08-01 16:09 ` Linus Torvalds
2015-08-01 17:09 ` Al Viro
2015-08-02 0:14 ` [git pull] vfs.git spurious ENOTDIR fix Al Viro
2015-08-02 0:23 ` Al Viro
2015-08-02 0:42 ` Linus Torvalds
2015-08-02 0:57 ` Linus Torvalds
2015-08-02 1:41 ` Al Viro
2015-08-02 2:39 ` Linus Torvalds
2015-08-02 4:06 ` Hugh Dickins
2015-08-02 4:39 ` Al Viro
2015-08-02 4:42 ` Linus Torvalds
2015-08-02 18:53 ` Hugh Dickins [this message]
2015-08-01 0:09 ` v4.2-rc dcache regression, probably 75a6f82a0d10 Hugh Dickins
2015-08-01 4:20 ` Hugh Dickins
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=alpine.LSU.2.11.1508021132350.19898@eggly.anvils \
--to=hughd@google.com \
--cc=asmadeus@codewreck.org \
--cc=bfields@fieldses.org \
--cc=dhowells@redhat.com \
--cc=dominique.martinet@cea.fr \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®