]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - zfs/config/kernel-fsync.m4
UBUNTU: SAUCE: (noup) Update spl to 0.6.5.9-1, zfs to 0.6.5.9-2
[mirror_ubuntu-artful-kernel.git] / zfs / config / kernel-fsync.m4
CommitLineData
87d546d8
TG
1dnl #
2dnl # Linux 2.6.x - 2.6.34 API
3dnl #
4AC_DEFUN([ZFS_AC_KERNEL_FSYNC_WITH_DENTRY], [
5 ZFS_LINUX_TRY_COMPILE([
6 #include <linux/fs.h>
7
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 ],[
16 ],[
17 AC_MSG_RESULT([dentry])
18 AC_DEFINE(HAVE_FSYNC_WITH_DENTRY, 1,
19 [fops->fsync() with dentry])
20 ],[
21 ])
22])
23
24dnl #
25dnl # Linux 2.6.35 - Linux 3.0 API
26dnl #
27AC_DEFUN([ZFS_AC_KERNEL_FSYNC_WITHOUT_DENTRY], [
28 ZFS_LINUX_TRY_COMPILE([
29 #include <linux/fs.h>
30
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 ],[
38 ],[
39 AC_MSG_RESULT([no dentry])
40 AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1,
41 [fops->fsync() without dentry])
42 ],[
43 ])
44])
45
46dnl #
47dnl # Linux 3.1 - 3.x API
48dnl #
49AC_DEFUN([ZFS_AC_KERNEL_FSYNC_RANGE], [
50 ZFS_LINUX_TRY_COMPILE([
51 #include <linux/fs.h>
52
53 int test_fsync(struct file *f, loff_t a, loff_t b, int c)
54 { return 0; }
55
56 static const struct file_operations
57 fops __attribute__ ((unused)) = {
58 .fsync = test_fsync,
59 };
60 ],[
61 ],[
62 AC_MSG_RESULT([range])
63 AC_DEFINE(HAVE_FSYNC_RANGE, 1,
64 [fops->fsync() with range])
65 ],[
66 ])
67])
68
69AC_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])