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