mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-31 04:14:21 +03:00
config: remove ZFS_GLOBAL_ZONE_PAGE_STATE
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16479
This commit is contained in:
parent
517d491a59
commit
e05f8c2d72
@ -1,28 +1,3 @@
|
|||||||
dnl #
|
|
||||||
dnl # 4.14 API change
|
|
||||||
dnl #
|
|
||||||
dnl # c41f012ade0b mm: rename global_page_state to global_zone_page_state
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GLOBAL_ZONE_PAGE_STATE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([global_zone_page_state], [
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/vmstat.h>
|
|
||||||
],[
|
|
||||||
(void) global_zone_page_state(0);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE], [
|
|
||||||
AC_MSG_CHECKING([whether global_zone_page_state() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([global_zone_page_state], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(ZFS_GLOBAL_ZONE_PAGE_STATE, 1,
|
|
||||||
[global_zone_page_state() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # Create a define and autoconf variable for an enum member
|
dnl # Create a define and autoconf variable for an enum member
|
||||||
dnl #
|
dnl #
|
||||||
@ -72,16 +47,10 @@ AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE_SANITY], [
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GLOBAL_PAGE_STATE], [
|
|
||||||
ZFS_AC_KERNEL_SRC_GLOBAL_ZONE_PAGE_STATE
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # enum members in which we're interested
|
dnl # enum members in which we're interested
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_PAGE_STATE], [
|
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_PAGE_STATE], [
|
||||||
ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE
|
|
||||||
|
|
||||||
ZFS_AC_KERNEL_ENUM_MEMBER([NR_FILE_PAGES],
|
ZFS_AC_KERNEL_ENUM_MEMBER([NR_FILE_PAGES],
|
||||||
[node_stat_item], [$LINUX/include/linux/mmzone.h])
|
[node_stat_item], [$LINUX/include/linux/mmzone.h])
|
||||||
ZFS_AC_KERNEL_ENUM_MEMBER([NR_INACTIVE_ANON],
|
ZFS_AC_KERNEL_ENUM_MEMBER([NR_INACTIVE_ANON],
|
||||||
|
@ -38,7 +38,6 @@ dnl #
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
||||||
ZFS_AC_KERNEL_SRC_TYPES
|
ZFS_AC_KERNEL_SRC_TYPES
|
||||||
ZFS_AC_KERNEL_SRC_OBJTOOL
|
ZFS_AC_KERNEL_SRC_OBJTOOL
|
||||||
ZFS_AC_KERNEL_SRC_GLOBAL_PAGE_STATE
|
|
||||||
ZFS_AC_KERNEL_SRC_ACCESS_OK_TYPE
|
ZFS_AC_KERNEL_SRC_ACCESS_OK_TYPE
|
||||||
ZFS_AC_KERNEL_SRC_PDE_DATA
|
ZFS_AC_KERNEL_SRC_PDE_DATA
|
||||||
ZFS_AC_KERNEL_SRC_GENERIC_FADVISE
|
ZFS_AC_KERNEL_SRC_GENERIC_FADVISE
|
||||||
|
@ -17,9 +17,7 @@
|
|||||||
/*
|
/*
|
||||||
* Create our own accessor functions to follow the Linux API changes
|
* Create our own accessor functions to follow the Linux API changes
|
||||||
*/
|
*/
|
||||||
#if defined(ZFS_GLOBAL_ZONE_PAGE_STATE)
|
|
||||||
|
|
||||||
/* global_zone_page_state() introduced */
|
|
||||||
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES)
|
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES)
|
||||||
#define nr_file_pages() global_node_page_state(NR_FILE_PAGES)
|
#define nr_file_pages() global_node_page_state(NR_FILE_PAGES)
|
||||||
#else
|
#else
|
||||||
@ -36,25 +34,4 @@
|
|||||||
#define nr_inactive_file_pages() global_zone_page_state(NR_INACTIVE_FILE)
|
#define nr_inactive_file_pages() global_zone_page_state(NR_INACTIVE_FILE)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/* global_node_page_state() introduced */
|
|
||||||
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES)
|
|
||||||
#define nr_file_pages() global_node_page_state(NR_FILE_PAGES)
|
|
||||||
#else
|
|
||||||
#define nr_file_pages() global_page_state(NR_FILE_PAGES)
|
|
||||||
#endif
|
|
||||||
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON)
|
|
||||||
#define nr_inactive_anon_pages() global_node_page_state(NR_INACTIVE_ANON)
|
|
||||||
#else
|
|
||||||
#define nr_inactive_anon_pages() global_page_state(NR_INACTIVE_ANON)
|
|
||||||
#endif
|
|
||||||
#if defined(ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE)
|
|
||||||
#define nr_inactive_file_pages() global_node_page_state(NR_INACTIVE_FILE)
|
|
||||||
#else
|
|
||||||
#define nr_inactive_file_pages() global_page_state(NR_INACTIVE_FILE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* ZFS_GLOBAL_ZONE_PAGE_STATE */
|
|
||||||
|
|
||||||
#endif /* _ZFS_PAGE_COMPAT_H */
|
#endif /* _ZFS_PAGE_COMPAT_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user