ztest: Fix scrub check in ztest_raidz_expand_check()
[zfs.git] / config / kernel-vfs-invalidate_folio.m4
blob61a5c8478af1f0d756e7607ab9ea54c5c0a75402
1 dnl #
2 dnl # Linux 5.18 uses invalidate_folio in lieu of invalidate_page
3 dnl #
4 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_INVALIDATE_FOLIO], [
5         ZFS_LINUX_TEST_SRC([vfs_has_invalidate_folio], [
6                 #include <linux/fs.h>
8                 static void
9                 test_invalidate_folio(struct folio *folio, size_t offset,
10                                       size_t len) {
11                         (void) folio; (void) offset; (void) len;
12                         return;
13                 }
15                 static const struct address_space_operations
16                     aops __attribute__ ((unused)) = {
17                         .invalidate_folio       = test_invalidate_folio,
18                 };
19         ],[])
22 AC_DEFUN([ZFS_AC_KERNEL_VFS_INVALIDATE_FOLIO], [
23         dnl #
24         dnl # Linux 5.18 uses invalidate_folio in lieu of invalidate_page
25         dnl #
26         AC_MSG_CHECKING([whether invalidate_folio exists])
27         ZFS_LINUX_TEST_RESULT([vfs_has_invalidate_folio], [
28                 AC_MSG_RESULT([yes])
29                 AC_DEFINE(HAVE_VFS_INVALIDATE_FOLIO, 1, [invalidate_folio exists])
30         ],[
31                 AC_MSG_RESULT([no])
32         ])