2 dnl # Linux 2.6.x - 2.6.34 API
4 AC_DEFUN([ZFS_AC_KERNEL_FSYNC_WITH_DENTRY], [
5 ZFS_LINUX_TRY_COMPILE([
8 int test_fsync(struct file *f, struct dentry *dentry, int x)
11 static const struct file_operations
12 fops __attribute__ ((unused)) = {
17 AC_MSG_RESULT([dentry])
18 AC_DEFINE(HAVE_FSYNC_WITH_DENTRY, 1,
19 [fops->fsync() with dentry])
25 dnl # Linux 2.6.35 - Linux 3.0 API
27 AC_DEFUN([ZFS_AC_KERNEL_FSYNC_WITHOUT_DENTRY], [
28 ZFS_LINUX_TRY_COMPILE([
31 int test_fsync(struct file *f, int x) { return 0; }
33 static const struct file_operations
34 fops __attribute__ ((unused)) = {
39 AC_MSG_RESULT([no dentry])
40 AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1,
41 [fops->fsync() without dentry])
47 dnl # Linux 3.1 - 3.x API
49 AC_DEFUN([ZFS_AC_KERNEL_FSYNC_RANGE], [
50 ZFS_LINUX_TRY_COMPILE([
53 int test_fsync(struct file *f, loff_t a, loff_t b, int c)
56 static const struct file_operations
57 fops __attribute__ ((unused)) = {
62 AC_MSG_RESULT([range])
63 AC_DEFINE(HAVE_FSYNC_RANGE, 1,
64 [fops->fsync() with range])
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