Hacker News new | ask | show | jobs
by cesarb 408 days ago
At least ext4 (and its predecessors ext2/ext3) uses 32-bit seconds for the timestamps, and has separate fields (available only when the inode size of the filesystem is greater than 128 bytes) for nanoseconds and for extending the seconds fields to 34 bits.
1 comments

True enough [1] but the end result is actually a slightly shorter time range ("only" 544 years vs. 584 years for a "true" 64-bit ns-resolution timestamp). Though, admittedly, when we get anywhere near to the year 2514 and happen to still be using ext4 (or yet another extN+1), the format can always be extended again.

Also, I may have been wrong about XFS on Linux at least; though the data structures are not as easy to follow as for ext4, they seem to be using struct timespec64 for all times, which has both separate fields for seconds and nanoseconds as well as a 64-bit-wide seconds field [2], covering a range of 584 billion years.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...

[2]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...