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_atime, i_mtime, and i_ctime changed from timespec to timespec64.
21 ZFS_LINUX_TEST_SRC([inode_times], [
27 memset(&ip, 0, sizeof(ip));
33 dnl # i_ctime no longer directly accessible, must use
34 dnl # inode_get_ctime(ip), inode_set_ctime*(ip) to
37 ZFS_LINUX_TEST_SRC([inode_get_ctime], [
42 memset(&ip, 0, sizeof(ip));
46 ZFS_LINUX_TEST_SRC([inode_set_ctime_to_ts], [
50 struct timespec64 ts = {0};
52 memset(&ip, 0, sizeof(ip));
53 inode_set_ctime_to_ts(&ip, ts);
58 dnl # i_atime/i_mtime no longer directly accessible, must use
59 dnl # inode_get_mtime(ip), inode_set_mtime*(ip) to
62 ZFS_LINUX_TEST_SRC([inode_get_atime], [
67 memset(&ip, 0, sizeof(ip));
70 ZFS_LINUX_TEST_SRC([inode_get_mtime], [
75 memset(&ip, 0, sizeof(ip));
79 ZFS_LINUX_TEST_SRC([inode_set_atime_to_ts], [
83 struct timespec64 ts = {0};
85 memset(&ip, 0, sizeof(ip));
86 inode_set_atime_to_ts(&ip, ts);
88 ZFS_LINUX_TEST_SRC([inode_set_mtime_to_ts], [
92 struct timespec64 ts = {0};
94 memset(&ip, 0, sizeof(ip));
95 inode_set_mtime_to_ts(&ip, ts);
99 AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
100 AC_MSG_CHECKING([whether timestamp_truncate() exists])
101 ZFS_LINUX_TEST_RESULT([timestamp_truncate], [
103 AC_DEFINE(HAVE_INODE_TIMESTAMP_TRUNCATE, 1,
104 [timestamp_truncate() exists])
109 AC_MSG_CHECKING([whether inode->i_*time's are timespec64])
110 ZFS_LINUX_TEST_RESULT([inode_times], [
114 AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1,
115 [inode->i_*time's are timespec64])
118 AC_MSG_CHECKING([whether inode_get_ctime() exists])
119 ZFS_LINUX_TEST_RESULT([inode_get_ctime], [
121 AC_DEFINE(HAVE_INODE_GET_CTIME, 1,
122 [inode_get_ctime() exists in linux/fs.h])
127 AC_MSG_CHECKING([whether inode_set_ctime_to_ts() exists])
128 ZFS_LINUX_TEST_RESULT([inode_set_ctime_to_ts], [
130 AC_DEFINE(HAVE_INODE_SET_CTIME_TO_TS, 1,
131 [inode_set_ctime_to_ts() exists in linux/fs.h])
136 AC_MSG_CHECKING([whether inode_get_atime() exists])
137 ZFS_LINUX_TEST_RESULT([inode_get_atime], [
139 AC_DEFINE(HAVE_INODE_GET_ATIME, 1,
140 [inode_get_atime() exists in linux/fs.h])
145 AC_MSG_CHECKING([whether inode_set_atime_to_ts() exists])
146 ZFS_LINUX_TEST_RESULT([inode_set_atime_to_ts], [
148 AC_DEFINE(HAVE_INODE_SET_ATIME_TO_TS, 1,
149 [inode_set_atime_to_ts() exists in linux/fs.h])
154 AC_MSG_CHECKING([whether inode_get_mtime() exists])
155 ZFS_LINUX_TEST_RESULT([inode_get_mtime], [
157 AC_DEFINE(HAVE_INODE_GET_MTIME, 1,
158 [inode_get_mtime() exists in linux/fs.h])
163 AC_MSG_CHECKING([whether inode_set_mtime_to_ts() exists])
164 ZFS_LINUX_TEST_RESULT([inode_set_mtime_to_ts], [
166 AC_DEFINE(HAVE_INODE_SET_MTIME_TO_TS, 1,
167 [inode_set_mtime_to_ts() exists in linux/fs.h])