]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - zfs/config/kernel-truncate-range.m4
x86/cpu: Make alternative_msr_write work for 32-bit code
[mirror_ubuntu-artful-kernel.git] / zfs / config / kernel-truncate-range.m4
CommitLineData
87d546d8
TG
1dnl #
2dnl # 3.5.0 API change
3dnl # torvalds/linux@17cf28afea2a1112f240a3a2da8af883be024811 removed
4dnl # truncate_range(). The file hole punching functionality is now
5dnl # provided by fallocate()
6dnl #
7AC_DEFUN([ZFS_AC_KERNEL_TRUNCATE_RANGE], [
8 AC_MSG_CHECKING([whether iops->truncate_range() exists])
9 ZFS_LINUX_TRY_COMPILE([
10 #include <linux/fs.h>
11 void truncate_range(struct inode *inode, loff_t start,
12 loff_t end) { return; }
13 static struct inode_operations iops __attribute__ ((unused)) = {
14 .truncate_range = truncate_range,
15 };
16 ],[
17 ],[
18 AC_MSG_RESULT(yes)
19 AC_DEFINE(HAVE_INODE_TRUNCATE_RANGE, 1,
20 [iops->truncate_range() exists])
21 ],[
22 AC_MSG_RESULT(no)
23 ])
24])