From: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neil@brown.name>
Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: try_break_deleg() and atomic_open()
Date: Mon, 11 May 2026 19:34:46 -0400 [thread overview]
Message-ID: <72c8e1e9c9212aeb8a0cb9f5321dd576685a4f7e.camel@kernel.org> (raw)
In-Reply-To: <177853810078.2788210.11836979435758859096@noble.neil.brown.name>
On Tue, 2026-05-12 at 08:21 +1000, NeilBrown wrote:
> Hi Jeff,
> quick question (I hope).
> Should atomic_open() call try_break_deleg() on the directory
> when a create is pending?
>
> This seems a bit iffy because the VFS doesn't necessarily know if a
> create will happen before it calls ->atomic_open, so it cannot know
> if it needs to break the deleg or not.
Agreed, so I'm thinking no to doing that in generic code.
> So maybe the individual ->atomic_open functions should do it?
>
I think that's probably what has to happen:
atomic_open() is there to handle the non-trivial open cases (mostly
network and clustered filesystems). Those, in general, also require
non-trivial delegation/lease handling. I think we sort of need to leave
it to the underlying fs in those cases since the kernel doesn't have
enough info to do it.
> I'm looking at dentry_create() which calls atomic_open() is quite a
> different way to how lookup_open() calls it. I'd like to change
> nfsd4 so it calls something a lot more like lookup_open() and in
> looking at what I would need to change, delegated_inode stood out.
>
Understood. I wish that were a bit less klunky, but I don't see a great
way to make it so.
Cheers,
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2026-05-11 23:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 22:21 try_break_deleg() and atomic_open() NeilBrown
2026-05-11 23:34 ` Jeff Layton [this message]
2026-05-12 3:52 ` NeilBrown
2026-05-12 10:52 ` Jeff Layton
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=72c8e1e9c9212aeb8a0cb9f5321dd576685a4f7e.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
/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