diff options
author | Brian Behlendorf <[email protected]> | 2020-02-26 13:18:07 -0800 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2020-05-12 10:53:32 -0700 |
commit | cf2a3464e99f71afccebde61d35d8eeb0bd87ac3 (patch) | |
tree | cc9c43cf1bb39471936529076f80af4356fb6f3e /include | |
parent | 43135b374658f76e95262afbf196ba2a178e118b (diff) |
Linux 5.6 compat: time_t
As part of the Linux kernel's y2038 changes the time_t type has been
fully retired. Callers are now required to use the time64_t type.
Rather than move to the new type, I've removed the few remaining
places where a time_t is used in the kernel code. They've been
replaced with a uint64_t which is already how ZFS internally
handled these values.
Going forward we should work towards updating the remaining user
space time_t consumers to the 64-bit interfaces.
Reviewed-by: Matthew Macy <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #10052
Closes #10064
Diffstat (limited to 'include')
-rw-r--r-- | include/spl/sys/time.h | 2 | ||||
-rw-r--r-- | include/sys/vdev_impl.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/spl/sys/time.h b/include/spl/sys/time.h index 312415b7b..24c1ec7c7 100644 --- a/include/spl/sys/time.h +++ b/include/spl/sys/time.h @@ -85,7 +85,7 @@ gethrestime(inode_timespec_t *ts) #endif } -static inline time_t +static inline uint64_t gethrestime_sec(void) { #if defined(HAVE_INODE_TIMESPEC64_TIMES) diff --git a/include/sys/vdev_impl.h b/include/sys/vdev_impl.h index f6f7bbb4b..090ba3fbc 100644 --- a/include/sys/vdev_impl.h +++ b/include/sys/vdev_impl.h @@ -274,7 +274,7 @@ struct vdev { range_tree_t *vdev_initialize_tree; /* valid while initializing */ uint64_t vdev_initialize_bytes_est; uint64_t vdev_initialize_bytes_done; - time_t vdev_initialize_action_time; /* start and end time */ + uint64_t vdev_initialize_action_time; /* start and end time */ /* TRIM related */ boolean_t vdev_trim_exit_wanted; @@ -295,7 +295,7 @@ struct vdev { uint64_t vdev_trim_rate; /* requested rate (bytes/sec) */ uint64_t vdev_trim_partial; /* requested partial TRIM */ uint64_t vdev_trim_secure; /* requested secure TRIM */ - time_t vdev_trim_action_time; /* start and end time */ + uint64_t vdev_trim_action_time; /* start and end time */ /* for limiting outstanding I/Os (initialize and TRIM) */ kmutex_t vdev_initialize_io_lock; |