From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.42 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793726517; b=Nzppyt0Zbt23lKfUC1E8F+6mjuB9mnutKTJn2eggyAWnnSPWZjgsfpKuF46ImEaHQjKR Im07Ew2//fQcVpeDN8pXCQEHUMsM5htLT4f3Asa/QzpmBXJVeGNgkDPA8i4/vPWrZzBYt iwuEV2fZfOnJ5wKisIjN1YbSJwhn7Jdhd5YnlqZEtcYS8duJMOXRYEeLcCZPKe99iO2jr wzYFm+xsIpJWYLtxAOPKINRb0MnxwGzglnH7TlflW5fQY782gS8e4p976Jd95XAWR/lYG D7wjzRfqtZUUuBfPNRv7p69oW9u6ScOg3H4VAA/Ht9eO5R+Q1Qvt+IPNWAMDndkX++g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793726517; 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:X-Mailer: References:In-Reply-To; bh=AD4L42H0HNVoYlglqMFr39a2BJYBFr7pQM1pceNP/MA=; b=fBfdYZjnmQJqbZ3n7xfOyShoPjYLeFnpRvwGGYDN9DyhQ3QCdR7pCgoWRyPNhRX5ciSf sVdiqULWrrQNGvFRTSWNYBPZLCqb9u0c4GJbATHK1mDmfomOUUsrcti+3FOb8GHKRfYtL bcAEIYlTqQpv2QaAKvmYKoO7IAuwsPNVSb3dy0KetxVmbPhnsCutAXumfsn/uRiedRt8A vtzrYtYzOCJwfJhE5QQYqtL91Nro1vLLlmUNYg2UMk5cznUT6YYDcXi/+gu6B/Hwrrili BjyKsQ+y+AwwxcYOLeecljf9ApJR6eY2kBJSMiu3Sb2pkemU8nK9IFcqDQ11ex66A+g== 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="PPSaT/cx"; arc=none smtp.remote-ip=209.85.128.42 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 98991606A328 for ; Tue, 3 Nov 2026 17:21:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 98991606A328 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, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=PPSaT/cx Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4a208d93758so47292525e9.3 for ; Tue, 03 Nov 2026 09:21:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793726516; x=1794331316; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:mime-version:from:to:cc:subject:date:message-id :reply-to:content-type; bh=AD4L42H0HNVoYlglqMFr39a2BJYBFr7pQM1pceNP/MA=; b=PPSaT/cxmZ6hURUQKCutb+9MNl3fhi5qn8d5wFV015ZFNP0p7wP/UMc9QWwSCjKlPZ zL/DD7gvjUVS1WwDG0vy7qUtdL4e9ZBG8lQnrDRgkfIUIZlbzvv/trLSefcWiQBKSr6u RWiOf73SY7QM6RfyYuZu6k4tR5WiWRRKh/RIeV0cY5iHRsNLK+hTXF4APDRoBkCtO0ct XYVAwfYwEMmz7BR45aY/9jxlYMj2cVxDIW7S6WMomC8Q4pSudP/vALucJz1DmpNouKJK rA6xG/hBuUMhhOF7kKRJNPw+Wh4MOGJIc9m2NaRK8UCv+/ZvMWsAaIltcn9U+q8NCPVX b5Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793726516; x=1794331316; h=in-reply-to:references: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=AD4L42H0HNVoYlglqMFr39a2BJYBFr7pQM1pceNP/MA=; b=YesbSme4umaHUt4VvoiN285TRkd63Kd59rAxX/Xnm5TyRAHwKk6p3yZ+b7rojH66KU AmyflR5catyqOOQDltX2MnfNq6EoFuJfe0yzN86g9aqoCJQ4LlvWx3gUxXjQOueKzrQV hHujSWZ771Gsf5G6GSb9+IfYIeaSLtifuS/TLk+LFyctEVWs4LJWzZtFeWkoHbsVA4TY x06DXYKE7+2IVCLbpCe4m9zbg6IfP6LcmuMfcfrQfKIY7VbzLL3o+sBBAeJpXRwFJHqO cU0Tb6/4ej+VbcUHYtI1hXkQl1AMZRqghXYWOdHmcxMuU/IhZdJCYGQAuOuCLTKFBRoo 2RQg== X-Forwarded-Encrypted: i=1; AKwUvBw8iUaRI/SzqkqKQaw1QHi8BesEYScDlyaHpB9MuYvjK4xrbdx6MHW/S+sQ3f+QYaYWAgd+Ney2/dHYgQ==@vger.kernel.org X-Gm-Message-State: APuU4Z/rgfoOd0+3ce64uI5qA+/cL8mm2ihVg7IV26FsY1jzNtKfHRJ1 NRya6KBHkfoF9b4I5UdbEObrK5R3eBMuiKz5oOgv04pGOl5nWETX9wL1 X-Gm-Gg: AYBFou16DucjV7yaypXNb7jxNvY2tXVOwWAspwwNy5lnZOcYYdSDM/+ztGsP/09iA3Y zmWG1aWeTorK4pYY9gMTz1wWN87PFNUffLYkqlXOTYf79cHxIvIlQSVDXcJaWIL3JVbNI70IdVL LZRqSWwDmOMtMg27ocmPvhkMcx7fCcr60vZOJ6g6JX/HDl12YiH34PrvtaGaUrj7KHE5QbYS1Ei 3OCbZ3BEHeAtI8KXc/3D3yvGZE6+XuKV7iSaHjdXLLYGTno3wMO66HrrojAu+cGEteX33qiwkj1 8Gq16QdSReIcFp9TIY+7IejN7HAH583vSu1IsXfnJHBouK5Eh0Zzpd1AhWvbx/JaEGc9ZG/o+QB B49sbRgrRy0FfmR1yhuejSvmv4ywCUjKuI4VEC37kr5LTWbDdReKObWOTQe219X5Zx/h86WYOYh dpXRdWhjlb57aaVfTAhfi5PnZCJAW+kCQfyE5VJmTVUrfjzb6U/sntcyTdrdmbTpvZOiuCUepLh vXTQROAN0tBZ8G5h96yzWyB9nKwaJghxChGUXaR6VTDRYDneUbdfXClJIzz0uPZhqYMaRpBFbx7 IBz+0FpWHGzoA5+JKksIv2+w X-Received: by 2002:a05:600c:3b0e:b0:4a7:7d22:c50c with SMTP id 5b1f17b1804b1-4ac150b2243mr345177055e9.2.1793726515970; Tue, 03 Nov 2026 09:21:55 -0800 (PST) Received: from localhost ([151.60.201.12]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4ac0a66caefsm287061365e9.5.2026.11.03.09.21.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Nov 2026 09:21:55 -0800 (PST) X-Mailing-List: linux-btrfs@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=1ae0fec9eeabe43856471b243f1ece3413edf7686407593b3575066613d8; micalg=pgp-sha512; protocol="application/pgp-signature" Date: Tue, 03 Nov 2026 18:21:53 +0100 Message-Id: Cc: "David Sterba" , "Alexander Viro" , "Christian Brauner" , "Namjae Jeon" , "Sungjong Seo" , "Konstantin Komarov" , "Chris Mason" , "Jan Kara" , "Yuezhang Mo" , "Chuck Lever" , "Darrick J . Wong" , "Sean Smith" , "Andrey Albershteyn" , "Pedro Falcato" , =?utf-8?q?Pali_Roh=C3=A1r?= , , , , , , Subject: Re: [RFC PATCH v3 0/5] add provenance time (ptime) From: "koraynilay" To: "Amir Goldstein" , "koraynilay" X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261101015551.786044-1-koray.fra@gmail.com> In-Reply-To: --1ae0fec9eeabe43856471b243f1ece3413edf7686407593b3575066613d8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Tue Nov 3, 2026 at 4:12 PM CET, Amir Goldstein wrote: > On Tue, Nov 3, 2026 at 12:25=E2=80=AFPM koraynilay = wrote: >> >> On Mon Nov 2, 2026 at 3:54 PM CET, Amir Goldstein wrote: >> > On Sun, Nov 1, 2026 at 2:57=E2=80=AFAM koraynilay wrote: >> >> >> >> This is an initial implementation of a new timestamp to indicate the >> >> time when a file/directory was initially created. >> >> >> >> This patch series takes inspiration from the one by Sean Smith >> >> [1], but using >> >> file_setattr()/file_getattr() as suggested by Darrick J. Wong >> >> in [2]. >> >> >> >> The semantics of this new timestamp should be at least these: >> >> - it should be the same as btime on a newly created file >> >> - it's user-settable, so it can be preserved for backups, filesystem >> >> conversions, archives and any similar operation >> >> - it should be preserved every time mtime gets preserved >> >> >> >> and the correspondence with the other timestamps is as follows: >> >> >> >> ctime <-> btime >> >> mtime <-> ptime >> >> >> >> Examples: >> >> 1) a .zsh_history file created in 2019, then after a few years the us= er >> >> decides to switch to another filesystem, copying the .zsh_history = to >> >> the new home, in that case btime would have the timestamp of the c= opy >> >> and ptime would have the 2019 timestamp (just like mtime would hav= e >> >> been preserved) >> >> 2) a symlink created in 2020 from the home directory to a /path going >> >> through the same process as the .zsh_history, in this case it woul= d >> >> also make sense to sync the ptime to the 2020 timestamp instead of >> >> keeping only the btime (so the inode creation time). >> >> >> >> The proof-of-concept code (for testing) for stat(1) and cp(1) is >> >> available at https://github.com/koraynilay/coreutils (master branch) >> >> (Note: these coreutils code changes are a prototype and won't be >> >> submitted upstream as-is, but they work as expected in simple stat an= d >> >> cp -a/--preserve=3Dptime tests) >> >> >> >> Lastly, the name "provenance" and "ptime" are not final, I personally >> >> don't have a strong opinion on any name, but while testing with stat(= 1) >> >> I noticed that "Provenance" is definitely too long for the normal >> >> output, so another option which would fit well is "Origin time", >> >> abbreviated as "ntime" (OrigiN time) and not as "otime", as that woul= d >> >> conflict with btrfs' internal naming and create confusion. >> > >> > FWIW, I agree that given the existing uses of btime and crtime in the >> > kernel and various XXXprogs, using 'ptime' for kernel code is probably >> > the lesser evil. >> >> What do you think about the origiN time (ntime) (Origin: in stat)? >> It would also coincidentally be alphabetically (ntime <-> mtime, n -> m) >> the same as btime <-> ctime (b -> c) ahah. >> > > Honestly I don't know. > My new idea is don't publish it in statx() at all. Well I was more talking about the actual variable names in all patches ahah. Thanks, koraynilay > Thanks, > Amir. --1ae0fec9eeabe43856471b243f1ece3413edf7686407593b3575066613d8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRJ2XvJtXGwULYEerQ0bnTtJTDoOAUCauoYMQAKCRA0bnTtJTDo OI2UAQDfLMxbWJxZCtj5g/a2TQHWFv3yLHmv7IEjclN8pYY5IgD/VFtdYZ3g+FW5 oxEEhXF7xBfTTV5O+6Ag8QIL/lM51wc= =XiPH -----END PGP SIGNATURE----- --1ae0fec9eeabe43856471b243f1ece3413edf7686407593b3575066613d8--