Lazy timestamp persistence
Lazytime is a Linux filesystem policy that defers writing selected inode timestamp changes to storage while retaining their updated values in memory.
The policy applies to atime, mtime and ctime. Documented persistence triggers include other inode changes, fsync(), syncfs(), sync(), eviction of an undeleted inode and aged timestamp writeback. strictatime and lazytime can be combined: update selection and persistence are separate decisions. [1]
Do not interpret the manual's 24-hour description as an unconditional durability deadline. Linux v6.12 initializes its dirtytime interval to 12 hours and describes possible two-interval behavior; dirtytime_expire_seconds tunes both writeback eligibility and worker wakeups. [2] [3]
fdatasync() may omit atime and mtime updates because those fields are not needed to retrieve file data. It is not interchangeable with fsync() when timestamp persistence matters. Neither policy establishes payload identity or a consistent backup snapshot. [4]
Relations
- related
- Relative access-time updates, File access time, File modification time, Inode change time, fsync, fdatasync
Advantages
- Can defer timestamp-only inode writes while keeping current timestamps visible in memory.
Limitations
- Timestamp updates still pending in memory may be lost in a crash.
- A scheduling interval is not proof that a particular update reached storage.
Citations
- Linux mount(2): MS_LAZYTIME and timestamp policy
- Linux v6.12 fs/fs-writeback.c: dirtytime interval and writeback
- Linux 6.12 VM documentation: dirtytime_expire_seconds
- Linux fsync(2): timestamp metadata and fdatasync
Further reading
Sources & caveats
- Source synthesis, with implementation details scoped to Linux v6.12; no crash test or measured performance claim.