Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1198280

Re: [git pull] vfs.git spurious ENOTDIR fix

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Hugh Dickins <hughd@google.com>
Newsgroups linux.kernel
Subject Re: [git pull] vfs.git spurious ENOTDIR fix
Date Sun, 02 Aug 2015 21:00:01 +0200
Message-ID <pT6Eh-49c-7@gated-at.bofh.it> (permalink)
References <pSmBs-4qd-11@gated-at.bofh.it> <pSnxw-5Mb-1@gated-at.bofh.it> <pSotC-78K-71@gated-at.bofh.it> <pSpzl-hg-25@gated-at.bofh.it> <pSrrs-32C-7@gated-at.bofh.it> <pSzp0-6i2-1@gated-at.bofh.it> <pSHwe-1cH-11@gated-at.bofh.it> <pSPas-3Sy-71@gated-at.bofh.it> <pSPk5-44m-9@gated-at.bofh.it> <pSPN9-4Dt-37@gated-at.bofh.it> <pSQzv-5Ni-3@gated-at.bofh.it> <pSRvA-7eL-3@gated-at.bofh.it> <pSSKZ-SR-3@gated-at.bofh.it> <pSTnH-1La-5@gated-at.bofh.it>
X-Original-To Linus Torvalds <torvalds@linux-foundation.org>, Al Viro <viro@zeniv.linux.org.uk>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=0gWkw262QDtewfqO/XvUhhQs4tUGUndlnz8zOtnE+uk=; b=GMDtmS+t/DuUJdrn5Yk3tdH38oIMjLUpawNsARR55qFlwgCqTYsEeX3db5Dmmczdk4 WkHhWZQANScvi4PTnAnopQdRo0iXIEYGjzmnpcQzMm7s+0izOG33N8hyp4P5u3m4Fxdq 9jVb7NBtpJTKUT39Cfhhs5/XbIZAXdBXtvOQYsqljF1RpLpB2YQwT5Iow4lehl9hCwGp llr+Zxos4SlJUCw2OHE4fDhWzJq0DXSMNrJDPr7VFg4xeYn7CyBGX/LlS59/w6F/Wfiw gN4c5zRC2An2439PStwi5BUPi/zj6Y9mYnrc0La+5UEoJzk4sKImPfqZplR1FuoAmv32 Kqww==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=0gWkw262QDtewfqO/XvUhhQs4tUGUndlnz8zOtnE+uk=; b=I4gUV+ZXKDumxJ38fWKY46iAjVRqUaqH9u4dce2yFMzNWzHs/ZSOfLei9RPFki7WQt v0TWjba5uYRWvQxVj6q4RSr3aBGh/xe9KYqo72b0nOMIg7etlQHXwbkGoK7aqvDmtjU4 kSwED05VFK+cbD2Uy0KrEZmzMdX/SOMBCtSpTI+YSS5q52I1EWAQhy1H4y+QBYaSVWwj q27AA61WXK9FpGR9tKbBu7TBilii8P3baD0flr12XlS2rslKahzrdyjI3+86qWzJxzlb oylyOigEedNYyzszIiXbOkfmgrjONm57RPReLCNZvADWja4ItbbhnTxNx1OfXyWV10QG 6usQ==
X-Gm-Message-State ALoCoQkAd921OoCiljfOQR/jJ8/cZroIWY83HgjhTZcaw+0euXL2gAvDNnlYKbc6UNu15x/fAAKP
X-Received by 10.69.26.65 with SMTP id iw1mr16735838pbd.24.1438541649773; Sun, 02 Aug 2015 11:54:09 -0700 (PDT)
X-X-Sender hugh@eggly.anvils
User-Agent Alpine 2.11 (LSU 23 2013-08-11)
MIME-Version 1.0
Content-Type TEXT/PLAIN; charset=US-ASCII
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 60
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Sun, 2 Aug 2015 11:53:16 -0700 (PDT)
X-Original-Message-ID <alpine.LSU.2.11.1508021132350.19898@eggly.anvils>
X-Original-References <alpine.LSU.2.11.1507311022320.10162@eggly.anvils> <CA+55aFxGp3Hn-CeFE1NTYDr7vt3xjqe2mV1BbZ2tYHpCxenuAA@mail.gmail.com> <alpine.LSU.2.11.1507311207160.11122@eggly.anvils> <20150731205036.GA3752@nautica> <CA+55aFz9jj_wAjXNoFbKFbV3M1Ki2KhHuoMwQGPi0wiQjMXdsw@mail.gmail.com> <20150801072603.GV17109@ZenIV.linux.org.uk> <CA+55aFx7OY8X=s=oc5HUeWeA-5vWqkH+gcOV80xC=xXv9Q3AnQ@mail.gmail.com> <20150802001402.GY17109@ZenIV.linux.org.uk> <20150802002318.GZ17109@ZenIV.linux.org.uk> <CA+55aFymnDY+kYeNY9Xak9kFGbJr5AMVVPGA0RzENoTVSumLJw@mail.gmail.com> <20150802014139.GA17109@ZenIV.linux.org.uk> <CA+55aFwrctpGzdFBsqwz97NOUBbWncdik-axas1vcNeyUXFHrA@mail.gmail.com> <alpine.LSU.2.11.1508012045250.17084@eggly.anvils> <CA+55aFyXeQED3ZKNshynHQ8uEKF71pST21EzamJwoLvCX4R_5w@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1198280

Show key headers only | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[git pull] vfs.git spurious ENOTDIR fix Al Viro <viro@ZenIV.linux.org.uk> - 2015-08-02 02:20 +0200
  Re: [git pull] vfs.git spurious ENOTDIR fix Al Viro <viro@ZenIV.linux.org.uk> - 2015-08-02 02:30 +0200
    Re: [git pull] vfs.git spurious ENOTDIR fix Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-02 02:50 +0200
    Re: [git pull] vfs.git spurious ENOTDIR fix Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-02 03:00 +0200
      Re: [git pull] vfs.git spurious ENOTDIR fix Al Viro <viro@ZenIV.linux.org.uk> - 2015-08-02 03:50 +0200
        Re: [git pull] vfs.git spurious ENOTDIR fix Hugh Dickins <hughd@google.com> - 2015-08-02 06:10 +0200
          Re: [git pull] vfs.git spurious ENOTDIR fix Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-02 06:50 +0200
            Re: [git pull] vfs.git spurious ENOTDIR fix Hugh Dickins <hughd@google.com> - 2015-08-02 21:00 +0200
          Re: [git pull] vfs.git spurious ENOTDIR fix Al Viro <viro@ZenIV.linux.org.uk> - 2015-08-02 06:50 +0200
        Re: [git pull] vfs.git spurious ENOTDIR fix Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-02 04:50 +0200

csiph-web