]>
Commit | Line | Data |
---|---|---|
7268e1be | 1 | dnl # |
608f8749 | 2 | dnl # Check file_operations->fsync interface. |
7268e1be | 3 | dnl # |
608f8749 | 4 | AC_DEFUN([ZFS_AC_KERNEL_SRC_FSYNC], [ |
608f8749 | 5 | ZFS_LINUX_TEST_SRC([fsync_without_dentry], [ |
adcd70bd | 6 | #include <linux/fs.h> |
adcd70bd | 7 | |
c38367c7 RY |
8 | int test_fsync(struct file *f, int x) { return 0; } |
9 | ||
10 | static const struct file_operations | |
11 | fops __attribute__ ((unused)) = { | |
12 | .fsync = test_fsync, | |
13 | }; | |
608f8749 | 14 | ],[]) |
adcd70bd | 15 | |
608f8749 | 16 | ZFS_LINUX_TEST_SRC([fsync_range], [ |
adcd70bd | 17 | #include <linux/fs.h> |
adcd70bd | 18 | |
c38367c7 RY |
19 | int test_fsync(struct file *f, loff_t a, loff_t b, int c) |
20 | { return 0; } | |
0a6b03d3 | 21 | |
c38367c7 RY |
22 | static const struct file_operations |
23 | fops __attribute__ ((unused)) = { | |
24 | .fsync = test_fsync, | |
25 | }; | |
608f8749 | 26 | ],[]) |
0a6b03d3 RY |
27 | ]) |
28 | ||
adcd70bd | 29 | AC_DEFUN([ZFS_AC_KERNEL_FSYNC], [ |
608f8749 | 30 | dnl # |
066e8252 | 31 | dnl # Linux 2.6.35 - Linux 3.0 API |
608f8749 | 32 | dnl # |
066e8252 BB |
33 | AC_MSG_CHECKING([whether fops->fsync() wants no dentry]) |
34 | ZFS_LINUX_TEST_RESULT([fsync_without_dentry], [ | |
608f8749 | 35 | AC_MSG_RESULT([yes]) |
066e8252 BB |
36 | AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1, |
37 | [fops->fsync() without dentry]) | |
608f8749 BB |
38 | ],[ |
39 | AC_MSG_RESULT([no]) | |
40 | ||
41 | dnl # | |
066e8252 | 42 | dnl # Linux 3.1 - 3.x API |
608f8749 | 43 | dnl # |
066e8252 BB |
44 | AC_MSG_CHECKING([whether fops->fsync() wants range]) |
45 | ZFS_LINUX_TEST_RESULT([fsync_range], [ | |
46 | AC_MSG_RESULT([range]) | |
47 | AC_DEFINE(HAVE_FSYNC_RANGE, 1, | |
48 | [fops->fsync() with range]) | |
608f8749 | 49 | ],[ |
066e8252 | 50 | ZFS_LINUX_TEST_ERROR([fops->fsync]) |
608f8749 BB |
51 | ]) |
52 | ]) | |
adcd70bd | 53 | ]) |