aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/kernel-shrink.m422
-rw-r--r--config/kernel.m41
2 files changed, 23 insertions, 0 deletions
diff --git a/config/kernel-shrink.m4 b/config/kernel-shrink.m4
index 1c211ed15..a57c2afb0 100644
--- a/config/kernel-shrink.m4
+++ b/config/kernel-shrink.m4
@@ -109,3 +109,25 @@ AC_DEFUN([ZFS_AC_KERNEL_FREE_CACHED_OBJECTS], [
AC_MSG_RESULT(no)
])
])
+
+dnl #
+dnl # 3.12 API change
+dnl # The nid member was added to struct shrink_control to support
+dnl # NUMA-aware shrinkers.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID], [
+ AC_MSG_CHECKING([whether shrink_control has nid])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ ],[
+ struct shrink_control sc __attribute__ ((unused));
+ unsigned long scnidsize __attribute__ ((unused)) =
+ sizeof(sc.nid);
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(SHRINK_CONTROL_HAS_NID, 1,
+ [struct shrink_control has nid])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
diff --git a/config/kernel.m4 b/config/kernel.m4
index 69470e128..a9f2f5898 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -87,6 +87,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_CALLBACK_SECURITY_INODE_INIT_SECURITY
ZFS_AC_KERNEL_MOUNT_NODEV
ZFS_AC_KERNEL_SHRINK
+ ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID
ZFS_AC_KERNEL_S_INSTANCES_LIST_HEAD
ZFS_AC_KERNEL_S_D_OP
ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER