Tag 2.1.1
[zfs.git] / config / kernel-fallocate.m4
blob7a8550f7e7607c47de19d3e8590241564970739d
1 dnl #
2 dnl # Linux 2.6.38 - 3.x API
3 dnl # The fallocate callback was moved from the inode_operations
4 dnl # structure to the file_operations structure.
5 dnl #
6 AC_DEFUN([ZFS_AC_KERNEL_SRC_FALLOCATE], [
7         ZFS_LINUX_TEST_SRC([file_fallocate], [
8                 #include <linux/fs.h>
10                 long test_fallocate(struct file *file, int mode,
11                     loff_t offset, loff_t len) { return 0; }
13                 static const struct file_operations
14                     fops __attribute__ ((unused)) = {
15                         .fallocate = test_fallocate,
16                 };
17         ], [])
20 AC_DEFUN([ZFS_AC_KERNEL_FALLOCATE], [
21         AC_MSG_CHECKING([whether fops->fallocate() exists])
22         ZFS_LINUX_TEST_RESULT([file_fallocate], [
23                 AC_MSG_RESULT(yes)
24         ],[
25                 ZFS_LINUX_TEST_ERROR([file_fallocate])
26         ])