2019-10-01 22:50:34 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
|
2020-02-06 23:37:25 +03:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2020-05-05 01:25:48 +03:00
|
|
|
memset(&ts, 0, sizeof(ts));
|
2020-02-06 23:37:25 +03:00
|
|
|
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 #
|
2019-10-01 22:50:34 +03:00
|
|
|
ZFS_LINUX_TEST_SRC([inode_times], [
|
2018-06-20 07:51:18 +03:00
|
|
|
#include <linux/fs.h>
|
|
|
|
],[
|
|
|
|
struct inode ip;
|
|
|
|
struct timespec ts;
|
|
|
|
|
|
|
|
memset(&ip, 0, sizeof(ip));
|
|
|
|
ts = ip.i_mtime;
|
2019-10-01 22:50:34 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
|
2020-02-06 23:37:25 +03:00
|
|
|
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)
|
|
|
|
])
|
|
|
|
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_MSG_CHECKING([whether inode->i_*time's are timespec64])
|
|
|
|
ZFS_LINUX_TEST_RESULT([inode_times], [
|
2018-06-20 07:51:18 +03:00
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1,
|
|
|
|
[inode->i_*time's are timespec64])
|
|
|
|
])
|
|
|
|
])
|