zfsonlinux/zfs — Issue #487: Enable 64-bit timestamps
Author: chrisrd
Created: 2011-12-12 07:50:29+00:00
State: open

ZFS and 64-bit linux are perfectly capable of dealing with 64-bit timestamps,
but zfs deliberately prevents setting them:

# touch -d'2039-01-01' /tank/foo && ls -l /tank/foo
touch: setting times of `/tank/foo': Value too large for defined data type

If spl/include/sys/time.h is changed to avoid this restriction (below), it's
then possible to use 64-bit timestamps:

# touch -d'2039-01-01' /tank/foo && ls -l /tank/foo
-rw-r--r-- 1 root root 0 2039-01-01 00:00 /tank/foo

I note that FreeBSD looks to have already removed the 32-bit
timestamp restriction for 64-bit architectures:

http://lists.freebsd.org/pipermail/svn-src-stable-8/2010-February/001642.html

For ZoL 64-bit systems, should this be selectable at build time, e.g. either
automatically based on the kernel environment (per this patch) and/or using
"configure --with-64bit-timetamps", or at runtime, e.g. using "zfs set" or
"zpool set"?