Provenance Time Proposed As A New Timestamp For Linux

Provenance Time Proposed As A New Timestamp For Linux

While the Linux kernel and various file-system drivers already support the notion of the birth time for tracking a file/directory's birth/creation time, a slightly different provenance time "ptime" is now being proposed for the Linux kernel. Provenance Time is a new timestamp proposal for indicating when a file/directory is created. How it differs from birth time is tracking the original creation date of file contents across file-system boundaries. The proposal for Provenance Time goes on to explain: "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 user decides to switch to another filesystem, copying the .zsh_history to the new home, in that case btime would have the timestamp of the copy and ptime would have the 2019 timestamp (just like mtime would have 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 would also make sense to sync the ptime to the 2020 timestamp instead of keeping only the btime (so the inode creation time)." The request for comments patches on Provenance Time enable it in the Linux kernel VFS layer and an initial file-system implementation for Btrfs. There are also proof-of-concept Coreutils patches for PTIME usage with stat and cp commands.

Original Source

Read the full article at Phoronix →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.