From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794962121; b=FnSEsK8Bt019Rhd/D8AOgO1dQQJjQERWi1NStIqsnOrHqG+DGzYBt4tnm90+/ps+k4I9 SP/GxpXK7YLzYtQzt0Oa9DjGN0VRPaEuDm95e1T5ys3pQjR6zJeHlobAmLik7OiEDhLBA 88Dpolfg+QvHJ2CFe1q3fzuhdpkHLN/bK0skBdHPaVhD58sfCX9DqLtLI4jjQ409H7yUy ubDo/Lq5eDa4T0bpeGcRYg9YHDv++02m6wb7RIj/OzQq9dDP4b2y6Iz8e7tP4nlzGvlHf WFcc1pllGyHQDUGh72zzkZvdWLyhndz6dJPwkCF2lYPFYyQ1d/Dye/qWt/0pJuRFb2g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794962121; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: Content-Transfer-Encoding:X-Mailer:References:In-Reply-To; bh=WbIzd+ctnJR4yFdsTDfSvvEGuowj5ndViMpewtBSJFs=; b=daGoxNOueep7+tW3cXYAWZsCwB5oYi24mDGwYDc1QWoyiqj5Z6sA6YqD6l9w8zgk+Z7e dGBcx/66GZ+4EOTMb9S8mai4UQ7nzSoeWUZezTg7YEVo+W/w4Lb50DnEAjswfhk+uB0kM HI/eByFmBvzNSz5LAk7yd6sbtWDph1fO00HGKMyjrHvWBIiJd1Zwgd4Ll+M4cPz5lpVj1 95XdakP8W62BHE1SpgNInThILkh5jAs1faxy20gSp7G/c1J6GN2lFPx5HuQKqhXPOECgT LEF+j3o5i0ik5E6x/FjK+Gd3EIB6twjOtgySD0iAxerktHeFAaoRRFIpi/sRgFDuRaw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=I7EoaNRr; arc=none smtp.remote-ip=209.85.221.41 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA1DB606A331 for ; Wed, 18 Nov 2026 00:35:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DA1DB606A331 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=I7EoaNRr Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-4a68190a2a7so185160f8f.1 for ; Tue, 17 Nov 2026 16:35:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794962119; x=1795566919; darn=vger.kernel.org; h=in-reply-to:references:content-transfer-encoding:to:from:subject:cc :message-id:date:content-type:mime-version:from:to:cc:subject:date :message-id:reply-to:content-type; bh=WbIzd+ctnJR4yFdsTDfSvvEGuowj5ndViMpewtBSJFs=; b=I7EoaNRrjYH4pzshKWe3F3r2aVYu25lUfqy5WzaHWCsQFKNGu2CKyZEl8M77OEW20l ElFzDsY6y02yTK05Ld0CMF9SYfA3AZzm7GlAM8+4GYI7al7Ka+Qq7fK1eMo/foXENPr2 u76HGEs1y1xGkF0GRs/MmlqkTIm0rZpSWYFjkEOW/yy49GI1HandgmmL2+P8W9lTwJ4v FbVJjCCpckG0p6epK7f5LESg5tBDdjuPqtcs0BxKjaA2x+BLQJCOpe6Cwhw48vSPUBWx atap5758sdew29z3hrp1l19YFfRLrLEF+dHij5BqeLeXUPNVcfW0rq6WcfiiQgmnzLUl lWHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794962119; x=1795566919; h=in-reply-to:references:content-transfer-encoding:to:from:subject:cc :message-id:date:content-type:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=WbIzd+ctnJR4yFdsTDfSvvEGuowj5ndViMpewtBSJFs=; b=unfiaCOfzx5zRFhR58cwFMeQyxXrcDvq+rvKLh2M7m5cLs/zoxwVJO+npyFj1aEre3 8cXDRNnFyg48TK1VBBkrDY77w+umHxtRCvwQHjSsPVuYvDKq43giu6plowylVUeVKDfX JWI3Ak8OXRA9NUpf3TiI/zWEScOwcbeaduX0OBqfM4M9woubbeJGm9QLXn1Q9/Cu/Doa jHjfHdRYuI8+iDRYL8oHmhpbKFOPPU+NH/LnUp8S9yAt/vlG/UriiRY/Ts54QIzrPcvA M6I4lL3KR8W5JRwxiXk+QFfj/fAIarDhxc0CrwsFrSHXsUqOMrikt3mow35w72CqQh9c 1Acg== X-Forwarded-Encrypted: i=1; AL+hErEbEXILT6yCMIE7QHKorGfnIHrZf9zpLJvp5e1Fpd7rT26PtLnBnHrtAEa+PNWk2fHqo+7cM9YpIWKog6g=@vger.kernel.org X-Gm-Message-State: APuU4Z+4cEZwTxhrm/DkOvIkv74g/JHPZpng/YsvozEyXmVBjataeGK9 sJlxcTYraIvmNvZwn+n2yp1qOob9uLBJc7hSwX298I+nTyxSRonleQLS X-Gm-Gg: AYBFou3kHA2KaBIT92vHUQGjR5uY+EhLL8xf6W2cqIAS3McAqotdqeKlR3yWkGji8uh CBsqrF2KJgIygs6squ6yPy5Fd7X51NzNxz7hLYicU8Q+Zyhon8KzDNmMwQ53dNpFtEGaB6dve0y kT4eG/ABMx0XvXq7brj03Jza8R7Kd4L0YWD7x7npPqZ4sPfx75Pe4NUsRDpnF3Tgd51tZjMFRZY ObsJnpCl8Ndf+jwGE3DZKRt8eKlOPI12y1QICC5U0mbLBeuEljgLTzJ+cPnDd7QN5TIiT05BOkq 8iHxP7fDw/F0Ttgx3mnWrhOJkPMDiCfiEefEHiio3R9bTscyo2zeddSzSruGuIZjksTqNDyjIj2 OllPy8k2au2rjtAG68aH7ZF5zneu0ecu+vccwLKfrcGkmFB1yDZAVzs0lqb5mAAH2Oxkms19gmD 82lU3crrYqhH6uURewlkKWO2nXAGkFbg7VxVLCsbzaaSfi4zfgnO5XtoDDN7FmBMJOeVvOwkt4b HJrQZ8y0rhqw8x75b9e3ug/+RvsKc9QrQ4T4OM2TTavpXErrTeynQrbUkVSupXYxYrWqotnZu2R txGgOxAmzwPEykxKzy4C4+N4PA== X-Received: by 2002:a05:600c:1906:b0:4b2:2ec5:8a2b with SMTP id 5b1f17b1804b1-4bb7da13900mr16206835e9.10.1794962118973; Tue, 17 Nov 2026 16:35:18 -0800 (PST) Received: from localhost ([2001:b07:5d26:7a6a:365a:60ff:fe0d:cfc6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4a65560bd46sm1551151f8f.31.2026.11.17.16.35.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Nov 2026 16:35:17 -0800 (PST) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Type: multipart/signed; boundary=3f37a8250c17ef201a283aa9d15331a4c7b5582752331b03c03104ec5ba6; micalg=pgp-sha512; protocol="application/pgp-signature" Date: Wed, 18 Nov 2026 01:35:11 +0100 Message-Id: Cc: "Chris Mason" , "Yuezhang Mo" , "Jan Kara" , "NeilBrown" , "Olga Kornievskaia" , "Dai Ngo" , "Tom Talpey" , "Ronnie Sahlberg" , "Shyam Prasad N" , "Bharath SM" , "Sergey Senozhatsky" , "ChenXiaoSong" , "Darrick J. Wong" , "Sean Smith" , "Andrey Albershteyn" , "Pedro Falcato" , "Amir Goldstein" , =?utf-8?q?Pali_Roh=C3=A1r?= , , , , , , , , Subject: Re: [RFC PATCH v4 07/10] nfsd: add provenance time (ptime) via FATTR4_TIME_CREATE From: "koraynilay" To: "Chuck Lever" , "koraynilay" , "David Sterba" , "Namjae Jeon" , "Sungjong Seo" , "Alexander Viro" , "Christian Brauner" , "Trond Myklebust" , "Anna Schumaker" , "Jeff Layton" , "Konstantin Komarov" , "Paulo Alcantara" Content-Transfer-Encoding: quoted-printable X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261115180343.576773-1-koray.fra@gmail.com> <20261115180343.576773-8-koray.fra@gmail.com> In-Reply-To: --3f37a8250c17ef201a283aa9d15331a4c7b5582752331b03c03104ec5ba6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hello and thanks for replying, On Tue Nov 17, 2026 at 11:01 PM CET, Chuck Lever wrote: > > > 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 > >> @@ -3646,7 +3649,14 @@ static __be32=20 >> 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 =3D &args->stat.ptime; >> + else >> + ts =3D &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. I implemented it in this way to have a proof-of-concept of how ptime could be use by filesystems that already support settable btime (as was suggested to me in [1]). There was also a discussion in v3[2] on NFS's FATTR4_TIME_CREATE as an example of such a filesystem > Essentially this changes the semantics of existing files that have > a btime set -- technically that's a regression. and since the NFS protocol itself states that FATTR4_TIME_CREATE should be user-settable, I think adhering more to it would be better. This would be fine even for already existing files IMO, since btime =3D=3D ptime if the user doesn't manually change it (or with --preserve=3Dptime for the various copying tools). Thanks, koraynilay [1]: https://lore.kernel.org/CAOQ4uxiuy0VwZj+3M-zRqQ49WTpHZpiaQ+6MZ8z8WdLjy= QM_zA@mail.gmail.com/ [2]: https://lore.kernel.org/20261103094906.n55n5dhrpct5ykmw@pali/ --3f37a8250c17ef201a283aa9d15331a4c7b5582752331b03c03104ec5ba6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSgVimKafU5DQMcjcDmj22qf5IGXAUCavzyvwAKCRDmj22qf5IG XOsRAP4vh5FXH5uGRieLcNxmpyXktFYo5TTK0/smQUKH1S3W4AD+OFSrMDbk0OBL bbF4a80MG9QJTSNaQXnZOrSA4Bhhew4= =tiHS -----END PGP SIGNATURE----- --3f37a8250c17ef201a283aa9d15331a4c7b5582752331b03c03104ec5ba6--