DragonFlyBSD/src 712774asys/vfs/ufs ufs_vnops.c dinode.h

ufs - Expand time_t support to 48 bits

* Fix time overflow issues in the original 32-bit UFS code in two
  ways.  First, treat the original 32-bit seconds fields as unsigned.
  Second, utilize the spare fields to expand these fields to 48 bits
  each.  Retain the nanosecond-grain accuracy of the nsec fields.

  These changes should be both forwards and backwards compatible within
  the respective supported timestamp ranges for filesystems created by
  DragonFlyBSD and for legacy UFS1 systems.

  However, DFly will no longer be compatible with any modern UFS1
  implementation in other operating systems which reuse the spare fields
  for other purposes.

  Also, dump and restore are still limited to 32-bit time stamps.  This
  should not be an issue since these utilities are basically no longer used
  in modern day.  UFS1 is still useful, but deprecated, and we don't really
  intend for it to be used with later incarnations that might still be in
  use by other OSes.  We do want to make sure that the time fields work
  properly, however, as UFS1 is still useful for certain things.

* The original di_atime, di_mtime, and di_ctime fields were implemented
  as signed 32 bit fields.  Change these to unsigned, extending time_t
  support from 2036 into the 2100 range.

* In addition, use the spare fields in the dinode to provide another
  16 bits to each of atime, mtime, and ctime, expanding the time fields
  to 48 bits (around 9 million years).

Noticed-by: aly
DeltaFile
+21-11sys/vfs/ufs/ufs_vnops.c
+15-9sys/vfs/ufs/dinode.h
+3-0sys/vfs/ufs/inode.h
+39-203 files

UnifiedSplitRaw