]>
Commit | Line | Data |
---|---|---|
cb2d1901 ED |
1 | dnl # |
2 | dnl # Linux 2.6.38 - 3.x API | |
3 | dnl # | |
4 | AC_DEFUN([ZFS_AC_KERNEL_FILE_FALLOCATE], [ | |
5 | AC_MSG_CHECKING([whether fops->fallocate() exists]) | |
6 | ZFS_LINUX_TRY_COMPILE([ | |
7 | #include <linux/fs.h> | |
8 | ],[ | |
9 | long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; | |
10 | struct file_operations fops __attribute__ ((unused)) = { | |
11 | .fallocate = fallocate, | |
12 | }; | |
13 | ],[ | |
14 | AC_MSG_RESULT(yes) | |
15 | AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists]) | |
16 | ],[ | |
17 | AC_MSG_RESULT(no) | |
18 | ]) | |
19 | ]) | |
20 | ||
21 | dnl # | |
22 | dnl # Linux 2.6.x - 2.6.37 API | |
23 | dnl # | |
24 | AC_DEFUN([ZFS_AC_KERNEL_INODE_FALLOCATE], [ | |
25 | AC_MSG_CHECKING([whether iops->fallocate() exists]) | |
26 | ZFS_LINUX_TRY_COMPILE([ | |
27 | #include <linux/fs.h> | |
28 | ],[ | |
29 | long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; | |
30 | struct inode_operations fops __attribute__ ((unused)) = { | |
31 | .fallocate = fallocate, | |
32 | }; | |
33 | ],[ | |
34 | AC_MSG_RESULT(yes) | |
35 | AC_DEFINE(HAVE_INODE_FALLOCATE, 1, [fops->fallocate() exists]) | |
36 | ],[ | |
37 | AC_MSG_RESULT(no) | |
38 | ]) | |
39 | ]) | |
40 | ||
0a6b03d3 RY |
41 | dnl # |
42 | dnl # PaX Linux 2.6.38 - 3.x API | |
43 | dnl # | |
44 | AC_DEFUN([ZFS_AC_PAX_KERNEL_FILE_FALLOCATE], [ | |
45 | AC_MSG_CHECKING([whether fops->fallocate() exists]) | |
46 | ZFS_LINUX_TRY_COMPILE([ | |
47 | #include <linux/fs.h> | |
48 | ],[ | |
49 | long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; | |
50 | struct file_operations_no_const fops __attribute__ ((unused)) = { | |
51 | .fallocate = fallocate, | |
52 | }; | |
53 | ],[ | |
54 | AC_MSG_RESULT(yes) | |
55 | AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists]) | |
56 | ],[ | |
57 | AC_MSG_RESULT(no) | |
58 | ]) | |
59 | ]) | |
60 | ||
cb2d1901 ED |
61 | dnl # |
62 | dnl # The fallocate callback was moved from the inode_operations | |
63 | dnl # structure to the file_operations structure. | |
64 | dnl # | |
65 | AC_DEFUN([ZFS_AC_KERNEL_FALLOCATE], [ | |
66 | ZFS_AC_KERNEL_FILE_FALLOCATE | |
67 | ZFS_AC_KERNEL_INODE_FALLOCATE | |
0a6b03d3 | 68 | ZFS_AC_PAX_KERNEL_FILE_FALLOCATE |
cb2d1901 | 69 | ]) |