diff options
author | Brian Behlendorf <[email protected]> | 2020-02-26 13:18:07 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-02-27 09:31:02 -0800 |
commit | 2c3a83701dd185cadb30db4556256534e2930c7d (patch) | |
tree | ffb9108b5b62b8c7bafccfe8ed10f00f6b5881bf /include | |
parent | ff5587d651371ab496f7962e85fe2c337fdb8a59 (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/os/linux/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/os/linux/spl/sys/time.h b/include/os/linux/spl/sys/time.h index 56fd725c0..4309c300b 100644 --- a/include/os/linux/spl/sys/time.h +++ b/include/os/linux/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 4f63e1ae5..b55871a5d 100644 --- a/include/sys/vdev_impl.h +++ b/include/sys/vdev_impl.h @@ -272,7 +272,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; @@ -293,7 +293,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; |