]>
Commit | Line | Data |
---|---|---|
7268e1be | 1 | dnl # |
adcd70bd | 2 | dnl # Linux 2.6.x - 2.6.34 API |
7268e1be | 3 | dnl # |
adcd70bd | 4 | AC_DEFUN([ZFS_AC_KERNEL_FSYNC_WITH_DENTRY], [ |
7268e1be BB |
5 | ZFS_LINUX_TRY_COMPILE([ |
6 | #include <linux/fs.h> | |
7 | ],[ | |
adcd70bd | 8 | int (*fsync) (struct file *, struct dentry *, int) = NULL; |
79713039 | 9 | struct file_operations fops __attribute__ ((unused)); |
7268e1be BB |
10 | |
11 | fops.fsync = fsync; | |
12 | ],[ | |
adcd70bd BB |
13 | AC_MSG_RESULT([dentry]) |
14 | AC_DEFINE(HAVE_FSYNC_WITH_DENTRY, 1, | |
15 | [fops->fsync() with dentry]) | |
7268e1be | 16 | ],[ |
7268e1be BB |
17 | ]) |
18 | ]) | |
adcd70bd BB |
19 | |
20 | dnl # | |
21 | dnl # Linux 2.6.35 - Linux 3.0 API | |
22 | dnl # | |
23 | AC_DEFUN([ZFS_AC_KERNEL_FSYNC_WITHOUT_DENTRY], [ | |
24 | ZFS_LINUX_TRY_COMPILE([ | |
25 | #include <linux/fs.h> | |
26 | ],[ | |
27 | int (*fsync) (struct file *, int) = NULL; | |
28 | struct file_operations fops __attribute__ ((unused)); | |
29 | ||
30 | fops.fsync = fsync; | |
31 | ],[ | |
32 | AC_MSG_RESULT([no dentry]) | |
33 | AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1, | |
34 | [fops->fsync() without dentry]) | |
35 | ],[ | |
36 | ]) | |
37 | ]) | |
38 | ||
39 | dnl # | |
0a6b03d3 | 40 | dnl # Linux 3.1 - 3.x API |
adcd70bd BB |
41 | dnl # |
42 | AC_DEFUN([ZFS_AC_KERNEL_FSYNC_RANGE], [ | |
43 | ZFS_LINUX_TRY_COMPILE([ | |
44 | #include <linux/fs.h> | |
45 | ],[ | |
46 | int (*fsync) (struct file *, loff_t, loff_t, int) = NULL; | |
47 | struct file_operations fops __attribute__ ((unused)); | |
48 | ||
49 | fops.fsync = fsync; | |
50 | ],[ | |
51 | AC_MSG_RESULT([range]) | |
52 | AC_DEFINE(HAVE_FSYNC_RANGE, 1, | |
53 | [fops->fsync() with range]) | |
54 | ],[ | |
55 | ]) | |
56 | ]) | |
57 | ||
0a6b03d3 RY |
58 | dnl # |
59 | dnl # PaX Linux 2.6.x - 2.6.34 API | |
60 | dnl # | |
61 | AC_DEFUN([ZFS_AC_PAX_KERNEL_FSYNC_WITH_DENTRY], [ | |
62 | ZFS_LINUX_TRY_COMPILE([ | |
63 | #include <linux/fs.h> | |
64 | ],[ | |
65 | int (*fsync) (struct file *, struct dentry *, int) = NULL; | |
66 | file_operations_no_const fops __attribute__ ((unused)); | |
67 | ||
68 | fops.fsync = fsync; | |
69 | ],[ | |
70 | AC_MSG_RESULT([dentry]) | |
71 | AC_DEFINE(HAVE_FSYNC_WITH_DENTRY, 1, | |
72 | [fops->fsync() with dentry]) | |
73 | ],[ | |
74 | ]) | |
75 | ]) | |
76 | ||
77 | dnl # | |
78 | dnl # PaX Linux 2.6.35 - Linux 3.0 API | |
79 | dnl # | |
80 | AC_DEFUN([ZFS_AC_PAX_KERNEL_FSYNC_WITHOUT_DENTRY], [ | |
81 | ZFS_LINUX_TRY_COMPILE([ | |
82 | #include <linux/fs.h> | |
83 | ],[ | |
84 | int (*fsync) (struct file *, int) = NULL; | |
85 | file_operations_no_const fops __attribute__ ((unused)); | |
86 | ||
87 | fops.fsync = fsync; | |
88 | ],[ | |
89 | AC_MSG_RESULT([no dentry]) | |
90 | AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1, | |
91 | [fops->fsync() without dentry]) | |
92 | ],[ | |
93 | ]) | |
94 | ]) | |
95 | ||
96 | dnl # | |
97 | dnl # PaX Linux 3.1 - 3.x API | |
98 | dnl # | |
99 | AC_DEFUN([ZFS_AC_PAX_KERNEL_FSYNC_RANGE], [ | |
100 | ZFS_LINUX_TRY_COMPILE([ | |
101 | #include <linux/fs.h> | |
102 | ],[ | |
103 | int (*fsync) (struct file *, loff_t, loff_t, int) = NULL; | |
104 | file_operations_no_const fops __attribute__ ((unused)); | |
105 | ||
106 | fops.fsync = fsync; | |
107 | ],[ | |
108 | AC_MSG_RESULT([range]) | |
109 | AC_DEFINE(HAVE_FSYNC_RANGE, 1, | |
110 | [fops->fsync() with range]) | |
111 | ],[ | |
112 | ]) | |
113 | ]) | |
114 | ||
adcd70bd BB |
115 | AC_DEFUN([ZFS_AC_KERNEL_FSYNC], [ |
116 | AC_MSG_CHECKING([whether fops->fsync() wants]) | |
117 | ZFS_AC_KERNEL_FSYNC_WITH_DENTRY | |
118 | ZFS_AC_KERNEL_FSYNC_WITHOUT_DENTRY | |
119 | ZFS_AC_KERNEL_FSYNC_RANGE | |
0a6b03d3 RY |
120 | ZFS_AC_PAX_KERNEL_FSYNC_WITH_DENTRY |
121 | ZFS_AC_PAX_KERNEL_FSYNC_WITHOUT_DENTRY | |
122 | ZFS_AC_PAX_KERNEL_FSYNC_RANGE | |
adcd70bd | 123 | ]) |