]>
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> | |
7268e1be | 7 | |
c38367c7 RY |
8 | int test_fsync(struct file *f, struct dentry *dentry, int x) |
9 | { return 0; } | |
10 | ||
11 | static const struct file_operations | |
12 | fops __attribute__ ((unused)) = { | |
13 | .fsync = test_fsync, | |
14 | }; | |
15 | ],[ | |
7268e1be | 16 | ],[ |
adcd70bd BB |
17 | AC_MSG_RESULT([dentry]) |
18 | AC_DEFINE(HAVE_FSYNC_WITH_DENTRY, 1, | |
19 | [fops->fsync() with dentry]) | |
7268e1be | 20 | ],[ |
7268e1be BB |
21 | ]) |
22 | ]) | |
adcd70bd BB |
23 | |
24 | dnl # | |
25 | dnl # Linux 2.6.35 - Linux 3.0 API | |
26 | dnl # | |
27 | AC_DEFUN([ZFS_AC_KERNEL_FSYNC_WITHOUT_DENTRY], [ | |
28 | ZFS_LINUX_TRY_COMPILE([ | |
29 | #include <linux/fs.h> | |
adcd70bd | 30 | |
c38367c7 RY |
31 | int test_fsync(struct file *f, int x) { return 0; } |
32 | ||
33 | static const struct file_operations | |
34 | fops __attribute__ ((unused)) = { | |
35 | .fsync = test_fsync, | |
36 | }; | |
37 | ],[ | |
adcd70bd BB |
38 | ],[ |
39 | AC_MSG_RESULT([no dentry]) | |
40 | AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1, | |
41 | [fops->fsync() without dentry]) | |
42 | ],[ | |
43 | ]) | |
44 | ]) | |
45 | ||
46 | dnl # | |
0a6b03d3 | 47 | dnl # Linux 3.1 - 3.x API |
adcd70bd BB |
48 | dnl # |
49 | AC_DEFUN([ZFS_AC_KERNEL_FSYNC_RANGE], [ | |
50 | ZFS_LINUX_TRY_COMPILE([ | |
51 | #include <linux/fs.h> | |
adcd70bd | 52 | |
c38367c7 RY |
53 | int test_fsync(struct file *f, loff_t a, loff_t b, int c) |
54 | { return 0; } | |
0a6b03d3 | 55 | |
c38367c7 RY |
56 | static const struct file_operations |
57 | fops __attribute__ ((unused)) = { | |
58 | .fsync = test_fsync, | |
59 | }; | |
0a6b03d3 | 60 | ],[ |
0a6b03d3 RY |
61 | ],[ |
62 | AC_MSG_RESULT([range]) | |
63 | AC_DEFINE(HAVE_FSYNC_RANGE, 1, | |
64 | [fops->fsync() with range]) | |
65 | ],[ | |
66 | ]) | |
67 | ]) | |
68 | ||
adcd70bd BB |
69 | AC_DEFUN([ZFS_AC_KERNEL_FSYNC], [ |
70 | AC_MSG_CHECKING([whether fops->fsync() wants]) | |
71 | ZFS_AC_KERNEL_FSYNC_WITH_DENTRY | |
72 | ZFS_AC_KERNEL_FSYNC_WITHOUT_DENTRY | |
73 | ZFS_AC_KERNEL_FSYNC_RANGE | |
74 | ]) |