From: Trond Myklebust <trondmy@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>,
Benjamin Coddington <bcodding@hammerspace.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Jeff Layton <jlayton@kernel.org>, NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-nfs@vger.kernel.org, Mike Snitzer <snitzer@kernel.org>
Subject: Re: [PATCH v1 0/3] Allow knfsd to use atomic_open()
Date: Tue, 18 Nov 2025 12:45:13 -0500 [thread overview]
Message-ID: <a578b2e33aa145be3f0d63a23bc7dfe2bd56d0ab.camel@kernel.org> (raw)
In-Reply-To: <050d60a8-7689-46f3-a303-28e01944b386@oracle.com>
On Tue, 2025-11-18 at 11:58 -0500, Chuck Lever wrote:
> On 11/18/25 11:33 AM, Benjamin Coddington wrote:
> > We have workloads that will benefit from allowing knfsd to use
> > atomic_open()
> > in the open/create path. There are two benefits; the first is the
> > original
> > matter of correctness: when knfsd must perform both vfs_create()
> > and
> > vfs_open() in series there can be races or error results that cause
> > the
> > caller to receive unexpected results.
>
> Commit fb70bf124b05 ("NFSD: Instantiate a struct file when creating a
> regular NFSv4 file") was supposed to address this. If there are still
> issues, then a Fixes: tag and some explanation of where there are
> gaps
> would be welcome in the commit message or cover letter. We might need
> to identify LTS backport requirements, in that case.
>
That patch only fixes the case where you're creating a local file and
then exporting it over NFSv4.
The case where we see a permissions problem is when creating a file
over NFSv4, and then exporting it over NFSv3.
i.e. it is the re-exporting over NFSv3 case.
Note that independently of the permissions issues, atomic_open also
solves races in open(O_CREAT|O_TRUNC). The NFS client now uses it for
both NFSv4 and NFSv3 for that reason.
See commit 7c6c5249f061 "NFS: add atomic_open for NFSv3 to handle
O_TRUNC correctly."
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trondmy@kernel.org, trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2025-11-18 17:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 16:33 [PATCH v1 0/3] Allow knfsd to use atomic_open() Benjamin Coddington
2025-11-18 16:33 ` [PATCH v1 1/3] VFS: move dentry_create() from fs/open.c to fs/namei.c Benjamin Coddington
2025-11-18 16:33 ` [PATCH v1 2/3] VFS: Prepare atomic_open() for dentry_create() Benjamin Coddington
2025-11-18 16:33 ` [PATCH v1 3/3] VFS/knfsd: Teach dentry_create() to use atomic_open() Benjamin Coddington
2025-11-18 18:01 ` Mike Snitzer
2025-11-18 18:39 ` Benjamin Coddington
2025-11-18 16:58 ` [PATCH v1 0/3] Allow knfsd " Chuck Lever
2025-11-18 17:17 ` Benjamin Coddington
2025-11-18 17:45 ` Trond Myklebust [this message]
2025-11-18 21:31 ` Jeff Layton
2025-11-19 1:23 ` NeilBrown
2025-11-19 12:46 ` Benjamin Coddington
2025-11-20 22:26 ` NeilBrown
2025-11-21 1:07 ` Benjamin Coddington
2025-11-26 20:59 ` NeilBrown
2025-11-26 22:06 ` Benjamin Coddington
2025-11-27 0:36 ` NeilBrown
2025-11-27 13:18 ` Benjamin Coddington
2025-11-19 1:32 ` [PATCH v1 2/3] VFS: Prepare atomic_open() for dentry_create() NeilBrown
2025-11-19 13:11 ` Benjamin Coddington
2025-11-19 1:41 ` [PATCH v1 3/3] VFS/knfsd: Teach dentry_create() to use atomic_open() NeilBrown
2025-11-19 13:02 ` Benjamin Coddington
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=a578b2e33aa145be3f0d63a23bc7dfe2bd56d0ab.camel@kernel.org \
--to=trondmy@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=bcodding@hammerspace.com \
--cc=brauner@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=snitzer@kernel.org \
--cc=tom@talpey.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.