linux: implement filesystem-side copy/clone functions for EL7
[zfs.git] / config / kernel-filemap.m4
blob745928168f92c4ede5e959d8dad44da71cae8f5b
1 dnl #
2 dnl # filemap_range_has_page was not available till 4.13
3 dnl #
4 AC_DEFUN([ZFS_AC_KERNEL_SRC_FILEMAP], [
5         ZFS_LINUX_TEST_SRC([filemap_range_has_page], [
6                 #include <linux/fs.h>
7         ],[
8                 struct address_space *mapping = NULL;
9                 loff_t lstart = 0;
10                 loff_t lend = 0;
11                 bool ret __attribute__ ((unused));
13                 ret = filemap_range_has_page(mapping, lstart, lend);
14         ])
17 AC_DEFUN([ZFS_AC_KERNEL_FILEMAP], [
18         AC_MSG_CHECKING([whether filemap_range_has_page() is available])
19         ZFS_LINUX_TEST_RESULT([filemap_range_has_page], [
20                 AC_MSG_RESULT(yes)
21                 AC_DEFINE(HAVE_FILEMAP_RANGE_HAS_PAGE, 1,
22                 [filemap_range_has_page() is available])
23         ],[
24                 AC_MSG_RESULT(no)
25         ])