xref: /freebsd/sys/contrib/openzfs/config/kernel-reclaim_state.m4 (revision ba3c1f5972d7b90feb6e6da47905ff2757e0fe57)
1AC_DEFUN([ZFS_AC_KERNEL_SRC_RECLAIMED], [
2	dnl #
3	dnl # 6.4 API change
4	dnl # The reclaimed_slab of struct reclaim_state
5	dnl # is renamed to reclaimed
6	dnl #
7	ZFS_LINUX_TEST_SRC([reclaim_state_reclaimed], [
8		#include <linux/swap.h>
9		static const struct reclaim_state
10		    rs  __attribute__ ((unused)) = {
11		    .reclaimed = 100,
12		};
13	],[])
14])
15
16AC_DEFUN([ZFS_AC_KERNEL_RECLAIMED], [
17	AC_MSG_CHECKING([whether struct reclaim_state has reclaimed field])
18	ZFS_LINUX_TEST_RESULT([reclaim_state_reclaimed], [
19		AC_MSG_RESULT(yes)
20		AC_DEFINE(HAVE_RECLAIM_STATE_RECLAIMED, 1,
21		   [struct reclaim_state has reclaimed])
22	],[
23		AC_MSG_RESULT(no)
24	])
25])
26
27