mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Linux 5.6 compat: ktime_get_raw_ts64()
The getrawmonotonic() and getrawmonotonic64() interfaces have been fully retired. Update gethrtime() to use the replacement interface ktime_get_raw_ts64() which was introduced in the 4.18 kernel. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #10052 Closes #10064
This commit is contained in:
committed by
Tony Hutter
parent
cf2a3464e9
commit
ba2cf53545
@@ -105,8 +105,13 @@ gethrestime_sec(void)
|
||||
static inline hrtime_t
|
||||
gethrtime(void)
|
||||
{
|
||||
#if defined(HAVE_KTIME_GET_RAW_TS64)
|
||||
struct timespec64 ts;
|
||||
ktime_get_raw_ts64(&ts);
|
||||
#else
|
||||
struct timespec ts;
|
||||
getrawmonotonic(&ts);
|
||||
#endif
|
||||
return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user