diff options
author | youzhongyang <[email protected]> | 2023-05-24 15:23:42 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2023-05-24 12:23:42 -0700 |
commit | f8447cf22ec39b2ec3498f0205d4fde3d7efcb27 (patch) | |
tree | dc6adecbb68bae8544d03f4b474f21fee13bdce6 /config | |
parent | ad0a554614b096698d9969340c4c593690042d5b (diff) |
Linux 6.4 compat: reclaimed_slab renamed to reclaimed
Reviewed-by: Richard Yao <[email protected]>
Reviewed-by: Brian Atkinson <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes #14891
Diffstat (limited to 'config')
-rw-r--r-- | config/kernel-reclaim_state.m4 | 26 | ||||
-rw-r--r-- | config/kernel.m4 | 2 |
2 files changed, 28 insertions, 0 deletions
diff --git a/config/kernel-reclaim_state.m4 b/config/kernel-reclaim_state.m4 new file mode 100644 index 000000000..9936b3c10 --- /dev/null +++ b/config/kernel-reclaim_state.m4 @@ -0,0 +1,26 @@ +AC_DEFUN([ZFS_AC_KERNEL_SRC_RECLAIMED], [ + dnl # + dnl # 6.4 API change + dnl # The reclaimed_slab of struct reclaim_state + dnl # is renamed to reclaimed + dnl # + ZFS_LINUX_TEST_SRC([reclaim_state_reclaimed], [ + #include <linux/swap.h> + static const struct reclaim_state + rs __attribute__ ((unused)) = { + .reclaimed = 100, + }; + ],[]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_RECLAIMED], [ + AC_MSG_CHECKING([whether struct reclaim_state has reclaimed field]) + ZFS_LINUX_TEST_RESULT([reclaim_state_reclaimed], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_RECLAIM_STATE_RECLAIMED, 1, + [struct reclaim_state has reclaimed]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + diff --git a/config/kernel.m4 b/config/kernel.m4 index 439ffdf5a..cb7e736c9 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -153,6 +153,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_IATTR_VFSID ZFS_AC_KERNEL_SRC_FILEMAP ZFS_AC_KERNEL_SRC_WRITEPAGE_T + ZFS_AC_KERNEL_SRC_RECLAIMED case "$host_cpu" in powerpc*) ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE @@ -285,6 +286,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_IATTR_VFSID ZFS_AC_KERNEL_FILEMAP ZFS_AC_KERNEL_WRITEPAGE_T + ZFS_AC_KERNEL_RECLAIMED case "$host_cpu" in powerpc*) ZFS_AC_KERNEL_CPU_HAS_FEATURE |