]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Linux 4.18 compat: inode timespec -> timespec64
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 20 Jun 2018 04:51:18 +0000 (21:51 -0700)
committerGitHub <noreply@github.com>
Wed, 20 Jun 2018 04:51:18 +0000 (21:51 -0700)
commit6413c95fbd88dc06ae57e50398b8530a17d0c7d3
treeeaa8a5618a917abcf0a4e30e328be4db4bd3e710
parentaeb39df72615b896db2b69921d7d887f1bb0a396
Linux 4.18 compat: inode timespec -> timespec64

Commit torvalds/linux@95582b0 changes the inode i_atime, i_mtime,
and i_ctime members form timespec's to timespec64's to make them
2038 safe.  As part of this change the current_time() function was
also updated to return the timespec64 type.

Resolve this issue by introducing a new inode_timespec_t type which
is defined to match the timespec type used by the inode.  It should
be used when working with inode timestamps to ensure matching types.

The timestruc_t type under Illumos was used in a similar fashion but
was specified to always be a timespec_t.  Rather than incorrectly
define this type all timespec_t types have been replaced by the new
inode_timespec_t type.

Finally, the kernel and user space 'sys/time.h' headers were aligned
with each other.  They define as appropriate for the context several
constants as macros and include static inline implementation of
gethrestime(), gethrestime_sec(), and gethrtime().

Reviewed-by: Chunwei Chen <tuxoko@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7643
27 files changed:
config/kernel-current-time.m4
config/kernel-inode-times.m4 [new file with mode: 0644]
config/kernel.m4
include/spl/sys/condvar.h
include/spl/sys/time.h
include/spl/sys/types.h
include/spl/sys/vnode.h
include/sys/dmu.h
include/sys/dmu_objset.h
include/sys/dsl_dir.h
include/sys/spa_impl.h
include/sys/xvattr.h
include/sys/zfs_context.h
include/sys/zfs_znode.h
include/sys/zpl.h
lib/libspl/Makefile.am
lib/libspl/gethrestime.c [deleted file]
lib/libspl/gethrtime.c [deleted file]
lib/libspl/include/sys/time.h
lib/libzpool/kernel.c
module/zfs/dmu_objset.c
module/zfs/dsl_dir.c
module/zfs/fm.c
module/zfs/zfs_ctldir.c
module/zfs/zfs_vnops.c
module/zfs/zfs_znode.c
module/zfs/zpl_inode.c