mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
5dbed50429
In v5.18 `filemap_range_has_page` moved to `pagemap.h` `pagemap.h` has been around since 3.10 so just include both Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Robert Evans <evansr@google.com> Closes #16034
28 lines
689 B
Plaintext
28 lines
689 B
Plaintext
dnl #
|
|
dnl # filemap_range_has_page was not available till 4.13
|
|
dnl #
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_FILEMAP], [
|
|
ZFS_LINUX_TEST_SRC([filemap_range_has_page], [
|
|
#include <linux/fs.h>
|
|
#include <linux/pagemap.h>
|
|
],[
|
|
struct address_space *mapping = NULL;
|
|
loff_t lstart = 0;
|
|
loff_t lend = 0;
|
|
bool ret __attribute__ ((unused));
|
|
|
|
ret = filemap_range_has_page(mapping, lstart, lend);
|
|
])
|
|
])
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_FILEMAP], [
|
|
AC_MSG_CHECKING([whether filemap_range_has_page() is available])
|
|
ZFS_LINUX_TEST_RESULT([filemap_range_has_page], [
|
|
AC_MSG_RESULT(yes)
|
|
AC_DEFINE(HAVE_FILEMAP_RANGE_HAS_PAGE, 1,
|
|
[filemap_range_has_page() is available])
|
|
],[
|
|
AC_MSG_RESULT(no)
|
|
])
|
|
])
|