1 AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
5 dnl # timespec64_trunc() replaced by timestamp_truncate() interface.
7 ZFS_LINUX_TEST_SRC([timestamp_truncate], [
13 memset(&ts, 0, sizeof(ts));
14 ts = timestamp_truncate(ts, &ip);
19 dnl # i_ctime no longer directly accessible, must use
20 dnl # inode_get_ctime(ip), inode_set_ctime*(ip) to
23 ZFS_LINUX_TEST_SRC([inode_get_ctime], [
28 memset(&ip, 0, sizeof(ip));
32 ZFS_LINUX_TEST_SRC([inode_set_ctime_to_ts], [
36 struct timespec64 ts = {0};
38 memset(&ip, 0, sizeof(ip));
39 inode_set_ctime_to_ts(&ip, ts);
44 dnl # i_atime/i_mtime no longer directly accessible, must use
45 dnl # inode_get_mtime(ip), inode_set_mtime*(ip) to
48 ZFS_LINUX_TEST_SRC([inode_get_atime], [
53 memset(&ip, 0, sizeof(ip));
56 ZFS_LINUX_TEST_SRC([inode_get_mtime], [
61 memset(&ip, 0, sizeof(ip));
65 ZFS_LINUX_TEST_SRC([inode_set_atime_to_ts], [
69 struct timespec64 ts = {0};
71 memset(&ip, 0, sizeof(ip));
72 inode_set_atime_to_ts(&ip, ts);
74 ZFS_LINUX_TEST_SRC([inode_set_mtime_to_ts], [
78 struct timespec64 ts = {0};
80 memset(&ip, 0, sizeof(ip));
81 inode_set_mtime_to_ts(&ip, ts);
85 AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
86 AC_MSG_CHECKING([whether timestamp_truncate() exists])
87 ZFS_LINUX_TEST_RESULT([timestamp_truncate], [
89 AC_DEFINE(HAVE_INODE_TIMESTAMP_TRUNCATE, 1,
90 [timestamp_truncate() exists])
95 AC_MSG_CHECKING([whether inode_get_ctime() exists])
96 ZFS_LINUX_TEST_RESULT([inode_get_ctime], [
98 AC_DEFINE(HAVE_INODE_GET_CTIME, 1,
99 [inode_get_ctime() exists in linux/fs.h])
104 AC_MSG_CHECKING([whether inode_set_ctime_to_ts() exists])
105 ZFS_LINUX_TEST_RESULT([inode_set_ctime_to_ts], [
107 AC_DEFINE(HAVE_INODE_SET_CTIME_TO_TS, 1,
108 [inode_set_ctime_to_ts() exists in linux/fs.h])
113 AC_MSG_CHECKING([whether inode_get_atime() exists])
114 ZFS_LINUX_TEST_RESULT([inode_get_atime], [
116 AC_DEFINE(HAVE_INODE_GET_ATIME, 1,
117 [inode_get_atime() exists in linux/fs.h])
122 AC_MSG_CHECKING([whether inode_set_atime_to_ts() exists])
123 ZFS_LINUX_TEST_RESULT([inode_set_atime_to_ts], [
125 AC_DEFINE(HAVE_INODE_SET_ATIME_TO_TS, 1,
126 [inode_set_atime_to_ts() exists in linux/fs.h])
131 AC_MSG_CHECKING([whether inode_get_mtime() exists])
132 ZFS_LINUX_TEST_RESULT([inode_get_mtime], [
134 AC_DEFINE(HAVE_INODE_GET_MTIME, 1,
135 [inode_get_mtime() exists in linux/fs.h])
140 AC_MSG_CHECKING([whether inode_set_mtime_to_ts() exists])
141 ZFS_LINUX_TEST_RESULT([inode_set_mtime_to_ts], [
143 AC_DEFINE(HAVE_INODE_SET_MTIME_TO_TS, 1,
144 [inode_set_mtime_to_ts() exists in linux/fs.h])