File: kernel-pagemap-folio_wait_bit.m4

package info (click to toggle)
zfs-linux 2.3.2-2
  • links: PTS, VCS
  • area: contrib
  • in suites: sid, trixie
  • size: 71,496 kB
  • sloc: ansic: 392,648; sh: 67,208; asm: 47,693; python: 8,160; makefile: 5,100; perl: 839; sed: 41
file content (26 lines) | stat: -rw-r--r-- 755 bytes parent folder | download | duplicates (4)
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
dnl #
dnl # Linux 5.16 no longer allows directly calling wait_on_page_bit, and
dnl # instead requires you to call folio-specific functions. In this case,
dnl # wait_on_page_bit(pg, PG_writeback) becomes
dnl # folio_wait_bit(pg, PG_writeback)
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_PAGEMAP_FOLIO_WAIT_BIT], [
	ZFS_LINUX_TEST_SRC([pagemap_has_folio_wait_bit], [
		#include <linux/pagemap.h>
	],[
		static struct folio *f = NULL;

		folio_wait_bit(f, PG_writeback);
	])
])

AC_DEFUN([ZFS_AC_KERNEL_PAGEMAP_FOLIO_WAIT_BIT], [
	AC_MSG_CHECKING([whether folio_wait_bit() exists])
	ZFS_LINUX_TEST_RESULT([pagemap_has_folio_wait_bit], [
		AC_MSG_RESULT([yes])
		AC_DEFINE(HAVE_PAGEMAP_FOLIO_WAIT_BIT, 1,
			[folio_wait_bit() exists])
	],[
		AC_MSG_RESULT([no])
	])
])