From: "Chuck Lever" <cel@kernel.org>
To: koraynilay <koray.fra@gmail.com>,
"David Sterba" <dsterba@suse.com>,
"Namjae Jeon" <linkinjeon@kernel.org>,
"Sungjong Seo" <sj1557.seo@samsung.com>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
"Christian Brauner" <brauner@kernel.org>,
"Trond Myklebust" <trondmy@kernel.org>,
"Anna Schumaker" <anna@kernel.org>,
"Jeff Layton" <jlayton@kernel.org>,
"Konstantin Komarov" <almaz.alexandrovich@paragon-software.com>,
"Paulo Alcantara" <pc@manguebit.org>
Cc: "Chris Mason" <mason@kernel.org>,
"Yuezhang Mo" <yuezhang.mo@sony.com>, "Jan Kara" <jack@suse.cz>,
NeilBrown <neil@brown.name>,
"Olga Kornievskaia" <okorniev@redhat.com>,
"Dai Ngo" <Dai.Ngo@oracle.com>, "Tom Talpey" <tom@talpey.com>,
"Ronnie Sahlberg" <ronniesahlberg@gmail.com>,
"Shyam Prasad N" <sprasad@microsoft.com>,
"Bharath SM" <bharathsm@microsoft.com>,
"Sergey Senozhatsky" <senozhatsky@chromium.org>,
ChenXiaoSong <chenxiaosong@chenxiaosong.com>,
"Darrick J. Wong" <djwong@kernel.org>,
"Sean Smith" <defendthedisabled@gmail.com>,
"Andrey Albershteyn" <aalbersh@kernel.org>,
"Pedro Falcato" <pfalcato@suse.de>,
"Amir Goldstein" <amir73il@gmail.com>,
"Pali Rohár" <pali@kernel.org>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, exfat@lists.linux.dev,
ntfs3@lists.linux.dev, linux-cifs@vger.kernel.org,
linux-nfs@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [RFC PATCH v4 07/10] nfsd: add provenance time (ptime) via FATTR4_TIME_CREATE
Date: Tue, 17 Nov 2026 17:01:43 -0500 [thread overview]
Message-ID: <f297d9ea-ebd7-47f4-ab7b-de5c45980000@app.fastmail.com> (raw)
In-Reply-To: <20261115180343.576773-8-koray.fra@gmail.com>
On Sun, Nov 15, 2026, at 1:03 PM, koraynilay wrote:
> Implement provenance time (ptime) in NFSD, as introduced in a
> previous commit ("vfs: add provenance time (ptime)").
>
> Map ptime to FATTR4_TIME_CREATE, allowing clients to set it across
> CREATE, OPEN and SETATTR compounds.
>
> If the underlying filesystem supports it, use __vfs_fileattr_set_locked()
> to set it, returning -EOPNOTSUPP in case it's not supported (i.e. when
> __vfs_fileattr_set_locked() returns -ENOIOCTLCMD).
>
> When querying FATTR4_TIME_CREATE, request both STATX_PTIME and
> STATX_BTIME, preferring ptime over btime if available, and advertise
> FATTR4_TIME_CREATE support if either ptime or btime is available.
>
> Assisted-by: Gemini:3.8-flash-high antigravity-cli-1.5.7
> Signed-off-by: koraynilay <koray.fra@gmail.com>
> @@ -3646,7 +3649,14 @@ static __be32
> nfsd4_encode_fattr4_time_access(struct xdr_stream *xdr,
> static __be32 nfsd4_encode_fattr4_time_create(struct xdr_stream *xdr,
> const struct nfsd4_fattr_args *args)
> {
> - return nfsd4_encode_nfstime4(xdr, &args->stat.btime);
> + const struct timespec64 *ts;
> +
> + if (args->stat.result_mask & STATX_PTIME)
> + ts = &args->stat.ptime;
> + else
> + ts = &args->stat.btime;
> +
> + return nfsd4_encode_nfstime4(xdr, ts);
> }
I have trouble with this approach.
We've already established that, for the Linux in-kernel NFS server
implementation, FATTR4_TIME_CREATE reports a file's birth time and
does not permit NFS clients to modify that.
After this patch is applied, the server reports the ptime instead
of the btime on some filesystems but not others.
Essentially this changes the semantics of existing files that have
a btime set -- technically that's a regression.
--
Chuck Lever (Come to NFS bake-a-thon! https://nfsv4bat.org)
next prev parent reply other threads:[~2026-11-17 22:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-15 18:03 [RFC PATCH v4 00/10] add provenance time (ptime) koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 01/10] vfs: " koraynilay
2026-11-16 20:10 ` Amir Goldstein
2026-11-16 20:53 ` koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 02/10] vfs: add fileattr_has_fsx_mask() koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 03/10] ntfs3: make crtime user-settable using ptime koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 04/10] exfat: " koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 05/10] btrfs: add provenance time (ptime) koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 06/10] vfs: add __vfs_fileattr_set_locked() for inode_lock()'d callers koraynilay
2026-11-16 13:52 ` Amir Goldstein
2026-11-16 15:55 ` koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 07/10] nfsd: add provenance time (ptime) via FATTR4_TIME_CREATE koraynilay
2026-11-17 22:01 ` Chuck Lever [this message]
2026-11-18 0:35 ` koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 08/10] nfs: " koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 09/10] ksmbd: add provenance time (ptime) and map it to CreationTime koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 10/10] cifs: add provenance time (ptime) and map it to SMB's CreationTime koraynilay
2026-11-17 23:53 ` [RFC PATCH v4 00/10] add provenance time (ptime) 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=f297d9ea-ebd7-47f4-ab7b-de5c45980000@app.fastmail.com \
--to=cel@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=aalbersh@kernel.org \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=amir73il@gmail.com \
--cc=anna@kernel.org \
--cc=bharathsm@microsoft.com \
--cc=brauner@kernel.org \
--cc=chenxiaosong@chenxiaosong.com \
--cc=defendthedisabled@gmail.com \
--cc=djwong@kernel.org \
--cc=dsterba@suse.com \
--cc=exfat@lists.linux.dev \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=koray.fra@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mason@kernel.org \
--cc=neil@brown.name \
--cc=ntfs3@lists.linux.dev \
--cc=okorniev@redhat.com \
--cc=pali@kernel.org \
--cc=pc@manguebit.org \
--cc=pfalcato@suse.de \
--cc=ronniesahlberg@gmail.com \
--cc=senozhatsky@chromium.org \
--cc=sj1557.seo@samsung.com \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
--cc=trondmy@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=yuezhang.mo@sony.com \
/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®