Implement a new type of zfs receive: corrective receive (-c)
[zfs.git] / config / kernel-vfs-filemap_dirty_folio.m4
blob729ca670da032edf685a0de44d1044e2312e11d5
1 dnl #
2 dnl # Linux 5.18 uses filemap_dirty_folio in lieu of
3 dnl # ___set_page_dirty_nobuffers
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_FILEMAP_DIRTY_FOLIO], [
6         ZFS_LINUX_TEST_SRC([vfs_has_filemap_dirty_folio], [
7                 #include <linux/pagemap.h>
8                 #include <linux/writeback.h>
10                 static const struct address_space_operations
11                     aops __attribute__ ((unused)) = {
12                         .dirty_folio    = filemap_dirty_folio,
13                 };
14         ],[])
17 AC_DEFUN([ZFS_AC_KERNEL_VFS_FILEMAP_DIRTY_FOLIO], [
18         dnl #
19         dnl # Linux 5.18 uses filemap_dirty_folio in lieu of
20         dnl # ___set_page_dirty_nobuffers
21         dnl #
22         AC_MSG_CHECKING([whether filemap_dirty_folio exists])
23         ZFS_LINUX_TEST_RESULT([vfs_has_filemap_dirty_folio], [
24                 AC_MSG_RESULT([yes])
25                 AC_DEFINE(HAVE_VFS_FILEMAP_DIRTY_FOLIO, 1,
26                         [filemap_dirty_folio exists])
27         ],[
28                 AC_MSG_RESULT([no])
29         ])