Add -p switch to "zpool get"
[zfs.git] / config / kernel-fsync.m4
1 dnl #
2 dnl # Linux 2.6.x - 2.6.34 API
3 dnl #
4 AC_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
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>
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
46 dnl #
47 dnl # Linux 3.1 - 3.x API
48 dnl #
49 AC_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
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 ])