summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2020-02-06 12:37:25 -0800
committerBrian Behlendorf <[email protected]>2020-02-07 11:04:32 -0800
commit795699a6cc28b8f1059397e03d1a86d576bfc7dc (patch)
treeb74437b02e3e0e846d98334c3408cad0caa13581 /config
parent0dd73648532e8654e07c28bba6c80bfb779a4938 (diff)
Linux 5.6 compat: timestamp_truncate()
The timestamp_truncate() function was added, it replaces the existing timespec64_trunc() function. This change renames our wrapper function to be consistent with the upstream name and updates the compatibility code for older kernels accordingly. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9956 Closes #9961
Diffstat (limited to 'config')
-rw-r--r--config/kernel-inode-times.m431
1 files changed, 27 insertions, 4 deletions
diff --git a/config/kernel-inode-times.m4 b/config/kernel-inode-times.m4
index 57e7f31fd..8a79c299e 100644
--- a/config/kernel-inode-times.m4
+++ b/config/kernel-inode-times.m4
@@ -1,8 +1,22 @@
-dnl #
-dnl # 4.18 API change
-dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64.
-dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
+
+ dnl #
+ dnl # 5.6 API change
+ dnl # timespec64_trunc() replaced by timestamp_truncate() interface.
+ dnl #
+ ZFS_LINUX_TEST_SRC([timestamp_truncate], [
+ #include <linux/fs.h>
+ ],[
+ struct timespec64 ts;
+ struct inode ip;
+
+ ts = timestamp_truncate(ts, &ip);
+ ])
+
+ dnl #
+ dnl # 4.18 API change
+ dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64.
+ dnl #
ZFS_LINUX_TEST_SRC([inode_times], [
#include <linux/fs.h>
],[
@@ -15,6 +29,15 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
])
AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
+ AC_MSG_CHECKING([whether timestamp_truncate() exists])
+ ZFS_LINUX_TEST_RESULT([timestamp_truncate], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_INODE_TIMESTAMP_TRUNCATE, 1,
+ [timestamp_truncate() exists])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+
AC_MSG_CHECKING([whether inode->i_*time's are timespec64])
ZFS_LINUX_TEST_RESULT([inode_times], [
AC_MSG_RESULT(no)