File: kernel-vfs-read_folio.m4

package info (click to toggle)
zfs-linux 2.1.11-1%2Bdeb12u1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 77,344 kB
  • sloc: ansic: 376,447; sh: 59,625; python: 7,872; asm: 6,476; makefile: 5,812; perl: 770; sed: 41; awk: 5
file content (32 lines) | stat: -rw-r--r-- 759 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
dnl #
dnl # Linux 5.19 uses read_folio in lieu of readpage
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_READ_FOLIO], [
	ZFS_LINUX_TEST_SRC([vfs_has_read_folio], [
		#include <linux/fs.h>

		static int
		test_read_folio(struct file *file, struct folio *folio) {
			(void) file; (void) folio;
			return (0);
		}

		static const struct address_space_operations
		    aops __attribute__ ((unused)) = {
			.read_folio	= test_read_folio,
		};
	],[])
])

AC_DEFUN([ZFS_AC_KERNEL_VFS_READ_FOLIO], [
	dnl #
	dnl # Linux 5.19 uses read_folio in lieu of readpage
	dnl #
	AC_MSG_CHECKING([whether read_folio exists])
	ZFS_LINUX_TEST_RESULT([vfs_has_read_folio], [
		AC_MSG_RESULT([yes])
		AC_DEFINE(HAVE_VFS_READ_FOLIO, 1, [read_folio exists])
	],[
		AC_MSG_RESULT([no])
	])
])