public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] EOPENSTALE handling in path_openat()
Date: Thu, 23 Jan 2025 02:03:27 +0000	[thread overview]
Message-ID: <20250123020327.GB1977892@ZenIV> (raw)
In-Reply-To: <CAJfpegtxKLYe_-mkv31Ww_PD984YZyPsDuwS=46gbmEKq4-5yg@mail.gmail.com>

On Tue, Jan 21, 2025 at 01:07:38PM +0100, Miklos Szeredi wrote:
> On Sun, 19 Jan 2025 at 06:40, Al Viro <viro@zeniv.linux.org.uk> wrote:
> 
> > Miklos, could you recall what was the original intent of that?
> > Do we want to keep that logics there, or should it just turn into
> > "map -ENOPENSTALE to -ESTALE??
> 
> I think the intent was to prevent a full LOOKUP_REVAL if this happened
> on the first try in do_filp_open().  I still think that makes sense,
> but needs a comment since it's not obvious.

For that to have happened we need the following sequence:
	* we started in RCU mode
	* we'd run into something that needs fallback to non-RCU (e.g.
open() callback itself)
	* we had successfully switched to non-lazy mode - grabbed
references, etc.
	* we got to call of open() callback and that returned us -EOPENSTALE.

What's the point of re-walking the same trajectory in dcache again
and why would it yield something different this time around?

IDGI.  We *can't* get to open callback without having already dealt
with leaving RCU mode - any chance of having walked into the wrong
place due to lack of locking has already been excluded when we'd
successfully left RCU mode; otherwise we would've gotten to that
check with error already equal to -ECHILD.

What sequence of events do you have in mind?

  reply	other threads:[~2025-01-23  2:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-19  5:39 [RFC] EOPENSTALE handling in path_openat() Al Viro
2025-01-21 12:07 ` Miklos Szeredi
2025-01-23  2:03   ` Al Viro [this message]
2025-01-23 10:16     ` Miklos Szeredi

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=20250123020327.GB1977892@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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