]> git.proxmox.com Git - mirror_zfs.git/blob - config/kernel-inode-times.m4
Allow mounting snapshots in .zfs/snapshot as a regular user
[mirror_zfs.git] / config / kernel-inode-times.m4
1 AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
2
3 dnl #
4 dnl # 5.6 API change
5 dnl # timespec64_trunc() replaced by timestamp_truncate() interface.
6 dnl #
7 ZFS_LINUX_TEST_SRC([timestamp_truncate], [
8 #include <linux/fs.h>
9 ],[
10 struct timespec64 ts;
11 struct inode ip;
12
13 memset(&ts, 0, sizeof(ts));
14 ts = timestamp_truncate(ts, &ip);
15 ])
16
17 dnl #
18 dnl # 4.18 API change
19 dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64.
20 dnl #
21 ZFS_LINUX_TEST_SRC([inode_times], [
22 #include <linux/fs.h>
23 ],[
24 struct inode ip;
25 struct timespec ts;
26
27 memset(&ip, 0, sizeof(ip));
28 ts = ip.i_mtime;
29 ])
30 ])
31
32 AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
33 AC_MSG_CHECKING([whether timestamp_truncate() exists])
34 ZFS_LINUX_TEST_RESULT([timestamp_truncate], [
35 AC_MSG_RESULT(yes)
36 AC_DEFINE(HAVE_INODE_TIMESTAMP_TRUNCATE, 1,
37 [timestamp_truncate() exists])
38 ],[
39 AC_MSG_RESULT(no)
40 ])
41
42 AC_MSG_CHECKING([whether inode->i_*time's are timespec64])
43 ZFS_LINUX_TEST_RESULT([inode_times], [
44 AC_MSG_RESULT(no)
45 ],[
46 AC_MSG_RESULT(yes)
47 AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1,
48 [inode->i_*time's are timespec64])
49 ])
50 ])