From deddfdd2804c68bc0c9b4c112f855e202aa37d21 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 3 Aug 2024 10:20:12 +1000 Subject: [PATCH] config: remove checks with unused defines All of these set a #define that doesn't appear anywhere in the tree. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Reviewed-by: Tino Reichardt Signed-off-by: Rob Norris Closes #16479 --- config/intlmacosx.m4 | 72 -------------- config/kernel-config-defined.m4 | 15 --- config/kernel-dentry-operations.m4 | 30 ------ config/kernel-inode-setattr.m4 | 22 ----- config/kernel-kstrtoul.m4 | 21 ---- config/kernel-make-request-fn.m4 | 42 ++------ config/kernel-mkdir.m4 | 9 -- config/kernel-rwsem.m4 | 60 ------------ config/kernel-shrink.m4 | 28 ------ config/kernel-vfs-iov_iter.m4 | 150 +---------------------------- config/kernel-vfs-iterate.m4 | 23 ----- config/kernel-xattr-handler.m4 | 28 ------ config/kernel-zlib.m4 | 26 ----- config/kernel.m4 | 6 -- 14 files changed, 13 insertions(+), 519 deletions(-) delete mode 100644 config/intlmacosx.m4 delete mode 100644 config/kernel-kstrtoul.m4 delete mode 100644 config/kernel-rwsem.m4 delete mode 100644 config/kernel-zlib.m4 diff --git a/config/intlmacosx.m4 b/config/intlmacosx.m4 deleted file mode 100644 index 30e6f50e0..000000000 --- a/config/intlmacosx.m4 +++ /dev/null @@ -1,72 +0,0 @@ -# intlmacosx.m4 serial 6 (gettext-0.20) -dnl Copyright (C) 2004-2014, 2016, 2019 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Checks for special options needed on Mac OS X. -dnl Defines INTL_MACOSX_LIBS. -AC_DEFUN([gt_INTL_MACOSX], -[ - dnl Check for API introduced in Mac OS X 10.4. - AC_CACHE_CHECK([for CFPreferencesCopyAppValue], - [gt_cv_func_CFPreferencesCopyAppValue], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[CFPreferencesCopyAppValue(NULL, NULL)]])], - [gt_cv_func_CFPreferencesCopyAppValue=yes], - [gt_cv_func_CFPreferencesCopyAppValue=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], - [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) - fi - dnl Check for API introduced in Mac OS X 10.5. - AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[CFLocaleCopyCurrent();]])], - [gt_cv_func_CFLocaleCopyCurrent=yes], - [gt_cv_func_CFLocaleCopyCurrent=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], - [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) - fi - AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[CFLocaleCopyPreferredLanguages();]])], - [gt_cv_func_CFLocaleCopyPreferredLanguages=yes], - [gt_cv_func_CFLocaleCopyPreferredLanguages=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then - AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1], - [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.]) - fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ - || test $gt_cv_func_CFLocaleCopyCurrent = yes \ - || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" - fi - AC_SUBST([INTL_MACOSX_LIBS]) -]) diff --git a/config/kernel-config-defined.m4 b/config/kernel-config-defined.m4 index 54837d728..83c40fa6c 100644 --- a/config/kernel-config-defined.m4 +++ b/config/kernel-config-defined.m4 @@ -4,21 +4,6 @@ dnl # detected at configure time and cause a build failure. Otherwise dnl # modules may be successfully built that behave incorrectly. dnl # AC_DEFUN([ZFS_AC_KERNEL_CONFIG_DEFINED], [ - AS_IF([test "x$cross_compiling" != xyes], [ - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([ - #include "$LINUX/include/linux/license.h" - ], [ - return !license_is_gpl_compatible( - "$ZFS_META_LICENSE"); - ]) - ], [ - AC_DEFINE([ZFS_IS_GPL_COMPATIBLE], [1], - [Define to 1 if GPL-only symbols can be used]) - ], [ - ]) - ]) - ZFS_AC_KERNEL_SRC_CONFIG_MODULES ZFS_AC_KERNEL_SRC_CONFIG_BLOCK ZFS_AC_KERNEL_SRC_CONFIG_DEBUG_LOCK_ALLOC diff --git a/config/kernel-dentry-operations.m4 b/config/kernel-dentry-operations.m4 index 500f61e26..957ebc9f0 100644 --- a/config/kernel-dentry-operations.m4 +++ b/config/kernel-dentry-operations.m4 @@ -119,34 +119,6 @@ AC_DEFUN([ZFS_AC_KERNEL_D_REVALIDATE_NAMEIDATA], [ ]) ]) -dnl # -dnl # 2.6.30 API change -dnl # The 'struct dentry_operations' was constified in the dentry structure. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_CONST_DENTRY_OPERATIONS], [ - ZFS_LINUX_TEST_SRC([dentry_operations_const], [ - #include - - const struct dentry_operations test_d_op = { - .d_revalidate = NULL, - }; - ],[ - struct dentry d __attribute__ ((unused)); - d.d_op = &test_d_op; - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_CONST_DENTRY_OPERATIONS], [ - AC_MSG_CHECKING([whether dentry uses const struct dentry_operations]) - ZFS_LINUX_TEST_RESULT([dentry_operations_const], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CONST_DENTRY_OPERATIONS, 1, - [dentry uses const struct dentry_operations]) - ],[ - ZFS_LINUX_TEST_ERROR([const dentry_operations]) - ]) -]) - dnl # dnl # 2.6.38 API change dnl # Added sb->s_d_op default dentry_operations member @@ -175,7 +147,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY], [ ZFS_AC_KERNEL_SRC_D_PRUNE_ALIASES ZFS_AC_KERNEL_SRC_D_SET_D_OP ZFS_AC_KERNEL_SRC_D_REVALIDATE_NAMEIDATA - ZFS_AC_KERNEL_SRC_CONST_DENTRY_OPERATIONS ZFS_AC_KERNEL_SRC_S_D_OP ]) @@ -185,6 +156,5 @@ AC_DEFUN([ZFS_AC_KERNEL_DENTRY], [ ZFS_AC_KERNEL_D_PRUNE_ALIASES ZFS_AC_KERNEL_D_SET_D_OP ZFS_AC_KERNEL_D_REVALIDATE_NAMEIDATA - ZFS_AC_KERNEL_CONST_DENTRY_OPERATIONS ZFS_AC_KERNEL_S_D_OP ]) diff --git a/config/kernel-inode-setattr.m4 b/config/kernel-inode-setattr.m4 index 69289e897..9a12acc95 100644 --- a/config/kernel-inode-setattr.m4 +++ b/config/kernel-inode-setattr.m4 @@ -37,19 +37,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [ .setattr = test_setattr, }; ],[]) - - ZFS_LINUX_TEST_SRC([inode_operations_setattr], [ - #include - - static int test_setattr( - struct dentry *de, struct iattr *ia) - { return 0; } - - static const struct inode_operations - iops __attribute__ ((unused)) = { - .setattr = test_setattr, - }; - ],[]) ]) AC_DEFUN([ZFS_AC_KERNEL_INODE_SETATTR], [ @@ -73,15 +60,6 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_SETATTR], [ [iops->setattr() takes struct user_namespace*]) ],[ AC_MSG_RESULT(no) - - AC_MSG_CHECKING([whether iops->setattr() exists]) - ZFS_LINUX_TEST_RESULT([inode_operations_setattr], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IOPS_SETATTR, 1, - [iops->setattr() exists]) - ],[ - AC_MSG_RESULT(no) - ]) ]) ]) ]) diff --git a/config/kernel-kstrtoul.m4 b/config/kernel-kstrtoul.m4 deleted file mode 100644 index 8e4b54297..000000000 --- a/config/kernel-kstrtoul.m4 +++ /dev/null @@ -1,21 +0,0 @@ -dnl # -dnl # 2.6.39 API change -dnl # Added kstrtoul() -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_KSTRTOUL], [ - ZFS_LINUX_TEST_SRC([kstrtoul], [ - #include - ],[ - int ret __attribute__ ((unused)) = kstrtoul(NULL, 10, NULL); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_KSTRTOUL], [ - AC_MSG_CHECKING([whether kstrtoul() exists]) - ZFS_LINUX_TEST_RESULT([kstrtoul], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KSTRTOUL, 1, [kstrtoul() exists]) - ],[ - ZFS_LINUX_TEST_ERROR([kstrtoul()]) - ]) -]) diff --git a/config/kernel-make-request-fn.m4 b/config/kernel-make-request-fn.m4 index 4c54bdd6d..66d6a18cd 100644 --- a/config/kernel-make-request-fn.m4 +++ b/config/kernel-make-request-fn.m4 @@ -2,14 +2,6 @@ dnl # dnl # Check for make_request_fn interface. dnl # AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [ - ZFS_LINUX_TEST_SRC([make_request_fn_void], [ - #include - static void make_request(struct request_queue *q, - struct bio *bio) { return; } - ],[ - blk_queue_make_request(NULL, &make_request); - ]) - ZFS_LINUX_TEST_SRC([make_request_fn_blk_qc_t], [ #include static blk_qc_t make_request(struct request_queue *q, @@ -197,36 +189,20 @@ AC_DEFUN([ZFS_AC_KERNEL_MAKE_REQUEST_FN], [ AC_MSG_RESULT(no) dnl # - dnl # Linux 3.2 API Change - dnl # make_request_fn returns void. + dnl # Linux 4.4 API Change + dnl # make_request_fn returns blk_qc_t. dnl # AC_MSG_CHECKING( - [whether make_request_fn() returns void]) - ZFS_LINUX_TEST_RESULT([make_request_fn_void], [ + [whether make_request_fn() returns blk_qc_t]) + ZFS_LINUX_TEST_RESULT([make_request_fn_blk_qc_t], [ AC_MSG_RESULT(yes) - AC_DEFINE(MAKE_REQUEST_FN_RET, void, + AC_DEFINE(MAKE_REQUEST_FN_RET, blk_qc_t, [make_request_fn() return type]) - AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_VOID, 1, - [Noting that make_request_fn() returns void]) + AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_QC, 1, + [Noting that make_request_fn() ] + [returns blk_qc_t]) ],[ - AC_MSG_RESULT(no) - - dnl # - dnl # Linux 4.4 API Change - dnl # make_request_fn returns blk_qc_t. - dnl # - AC_MSG_CHECKING( - [whether make_request_fn() returns blk_qc_t]) - ZFS_LINUX_TEST_RESULT([make_request_fn_blk_qc_t], [ - AC_MSG_RESULT(yes) - AC_DEFINE(MAKE_REQUEST_FN_RET, blk_qc_t, - [make_request_fn() return type]) - AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_QC, 1, - [Noting that make_request_fn() ] - [returns blk_qc_t]) - ],[ - ZFS_LINUX_TEST_ERROR([make_request_fn]) - ]) + ZFS_LINUX_TEST_ERROR([make_request_fn]) ]) ]) ]) diff --git a/config/kernel-mkdir.m4 b/config/kernel-mkdir.m4 index 367f10009..bad79f3aa 100644 --- a/config/kernel-mkdir.m4 +++ b/config/kernel-mkdir.m4 @@ -80,15 +80,6 @@ AC_DEFUN([ZFS_AC_KERNEL_MKDIR], [ [iops->mkdir() takes struct user_namespace*]) ],[ AC_MSG_RESULT(no) - - AC_MSG_CHECKING([whether iops->mkdir() takes umode_t]) - ZFS_LINUX_TEST_RESULT([inode_operations_mkdir], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_MKDIR_UMODE_T, 1, - [iops->mkdir() takes umode_t]) - ],[ - ZFS_LINUX_TEST_ERROR([mkdir()]) - ]) ]) ]) ]) diff --git a/config/kernel-rwsem.m4 b/config/kernel-rwsem.m4 deleted file mode 100644 index d3a64a8ef..000000000 --- a/config/kernel-rwsem.m4 +++ /dev/null @@ -1,60 +0,0 @@ -dnl # -dnl # 3.16 API Change -dnl # -dnl # rwsem-spinlock "->activity" changed to "->count" -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_RWSEM_ACTIVITY], [ - ZFS_LINUX_TEST_SRC([rwsem_activity], [ - #include - ],[ - struct rw_semaphore dummy_semaphore __attribute__ ((unused)); - dummy_semaphore.activity = 0; - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_RWSEM_ACTIVITY], [ - AC_MSG_CHECKING([whether struct rw_semaphore has member activity]) - ZFS_LINUX_TEST_RESULT([rwsem_activity], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_RWSEM_ACTIVITY, 1, - [struct rw_semaphore has member activity]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # 4.8 API Change -dnl # -dnl # rwsem "->count" changed to atomic_long_t type -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_RWSEM_ATOMIC_LONG_COUNT], [ - ZFS_LINUX_TEST_SRC([rwsem_atomic_long_count], [ - #include - ],[ - DECLARE_RWSEM(dummy_semaphore); - (void) atomic_long_read(&dummy_semaphore.count); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_RWSEM_ATOMIC_LONG_COUNT], [ - AC_MSG_CHECKING( - [whether struct rw_semaphore has atomic_long_t member count]) - ZFS_LINUX_TEST_RESULT([rwsem_atomic_long_count], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_RWSEM_ATOMIC_LONG_COUNT, 1, - [struct rw_semaphore has atomic_long_t member count]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_SRC_RWSEM], [ - ZFS_AC_KERNEL_SRC_RWSEM_ACTIVITY - ZFS_AC_KERNEL_SRC_RWSEM_ATOMIC_LONG_COUNT -]) - -AC_DEFUN([ZFS_AC_KERNEL_RWSEM], [ - ZFS_AC_KERNEL_RWSEM_ACTIVITY - ZFS_AC_KERNEL_RWSEM_ATOMIC_LONG_COUNT -]) diff --git a/config/kernel-shrink.m4 b/config/kernel-shrink.m4 index 6580b08d5..4879a129a 100644 --- a/config/kernel-shrink.m4 +++ b/config/kernel-shrink.m4 @@ -216,38 +216,11 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_CALLBACK],[ ]) ]) -dnl # -dnl # 2.6.39 API change, -dnl # Shrinker adjust to use common shrink_control structure. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINK_CONTROL_STRUCT], [ - ZFS_LINUX_TEST_SRC([shrink_control_struct], [ - #include - ],[ - struct shrink_control sc __attribute__ ((unused)); - - sc.nr_to_scan = 0; - sc.gfp_mask = GFP_KERNEL; - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_STRUCT], [ - AC_MSG_CHECKING([whether struct shrink_control exists]) - ZFS_LINUX_TEST_RESULT([shrink_control_struct], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SHRINK_CONTROL_STRUCT, 1, - [struct shrink_control exists]) - ],[ - ZFS_LINUX_TEST_ERROR([shrink_control]) - ]) -]) - AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER], [ ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK_PTR ZFS_AC_KERNEL_SRC_SHRINK_CONTROL_HAS_NID ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK - ZFS_AC_KERNEL_SRC_SHRINK_CONTROL_STRUCT ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG ZFS_AC_KERNEL_SRC_SHRINKER_REGISTER ]) @@ -256,5 +229,4 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINKER], [ ZFS_AC_KERNEL_SUPER_BLOCK_S_SHRINK ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID ZFS_AC_KERNEL_SHRINKER_CALLBACK - ZFS_AC_KERNEL_SHRINK_CONTROL_STRUCT ]) diff --git a/config/kernel-vfs-iov_iter.m4 b/config/kernel-vfs-iov_iter.m4 index e7ced0297..ed7961a9e 100644 --- a/config/kernel-vfs-iov_iter.m4 +++ b/config/kernel-vfs-iov_iter.m4 @@ -2,44 +2,6 @@ dnl # dnl # Check for available iov_iter functionality. dnl # AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [ - ZFS_LINUX_TEST_SRC([iov_iter_types], [ - #include - #include - ],[ - int type __attribute__ ((unused)) = ITER_KVEC; - ]) - - ZFS_LINUX_TEST_SRC([iov_iter_advance], [ - #include - #include - ],[ - struct iov_iter iter = { 0 }; - size_t advance = 512; - - iov_iter_advance(&iter, advance); - ]) - - ZFS_LINUX_TEST_SRC([iov_iter_revert], [ - #include - #include - ],[ - struct iov_iter iter = { 0 }; - size_t revert = 512; - - iov_iter_revert(&iter, revert); - ]) - - ZFS_LINUX_TEST_SRC([iov_iter_fault_in_readable], [ - #include - #include - ],[ - struct iov_iter iter = { 0 }; - size_t size = 512; - int error __attribute__ ((unused)); - - error = iov_iter_fault_in_readable(&iter, size); - ]) - ZFS_LINUX_TEST_SRC([fault_in_iov_iter_readable], [ #include #include @@ -51,40 +13,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [ error = fault_in_iov_iter_readable(&iter, size); ]) - ZFS_LINUX_TEST_SRC([iov_iter_count], [ - #include - #include - ],[ - struct iov_iter iter = { 0 }; - size_t bytes __attribute__ ((unused)); - - bytes = iov_iter_count(&iter); - ]) - - ZFS_LINUX_TEST_SRC([copy_to_iter], [ - #include - #include - ],[ - struct iov_iter iter = { 0 }; - char buf[512] = { 0 }; - size_t size = 512; - size_t bytes __attribute__ ((unused)); - - bytes = copy_to_iter((const void *)&buf, size, &iter); - ]) - - ZFS_LINUX_TEST_SRC([copy_from_iter], [ - #include - #include - ],[ - struct iov_iter iter = { 0 }; - char buf[512] = { 0 }; - size_t size = 512; - size_t bytes __attribute__ ((unused)); - - bytes = copy_from_iter((void *)&buf, size, &iter); - ]) - ZFS_LINUX_TEST_SRC([iov_iter_get_pages2], [ #include ], [ @@ -133,83 +61,13 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [ AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [ enable_vfs_iov_iter="yes" - AC_MSG_CHECKING([whether iov_iter types are available]) - ZFS_LINUX_TEST_RESULT([iov_iter_types], [ + AC_MSG_CHECKING([whether fault_in_iov_iter_readable() is available]) + ZFS_LINUX_TEST_RESULT([fault_in_iov_iter_readable], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IOV_ITER_TYPES, 1, - [iov_iter types are available]) + AC_DEFINE(HAVE_FAULT_IN_IOV_ITER_READABLE, 1, + [fault_in_iov_iter_readable() is available]) ],[ AC_MSG_RESULT(no) - enable_vfs_iov_iter="no" - ]) - - AC_MSG_CHECKING([whether iov_iter_advance() is available]) - ZFS_LINUX_TEST_RESULT([iov_iter_advance], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IOV_ITER_ADVANCE, 1, - [iov_iter_advance() is available]) - ],[ - AC_MSG_RESULT(no) - enable_vfs_iov_iter="no" - ]) - - AC_MSG_CHECKING([whether iov_iter_revert() is available]) - ZFS_LINUX_TEST_RESULT([iov_iter_revert], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IOV_ITER_REVERT, 1, - [iov_iter_revert() is available]) - ],[ - AC_MSG_RESULT(no) - enable_vfs_iov_iter="no" - ]) - - AC_MSG_CHECKING([whether iov_iter_fault_in_readable() is available]) - ZFS_LINUX_TEST_RESULT([iov_iter_fault_in_readable], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IOV_ITER_FAULT_IN_READABLE, 1, - [iov_iter_fault_in_readable() is available]) - ],[ - AC_MSG_RESULT(no) - - AC_MSG_CHECKING([whether fault_in_iov_iter_readable() is available]) - ZFS_LINUX_TEST_RESULT([fault_in_iov_iter_readable], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FAULT_IN_IOV_ITER_READABLE, 1, - [fault_in_iov_iter_readable() is available]) - ],[ - AC_MSG_RESULT(no) - enable_vfs_iov_iter="no" - ]) - ]) - - AC_MSG_CHECKING([whether iov_iter_count() is available]) - ZFS_LINUX_TEST_RESULT([iov_iter_count], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IOV_ITER_COUNT, 1, - [iov_iter_count() is available]) - ],[ - AC_MSG_RESULT(no) - enable_vfs_iov_iter="no" - ]) - - AC_MSG_CHECKING([whether copy_to_iter() is available]) - ZFS_LINUX_TEST_RESULT([copy_to_iter], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_COPY_TO_ITER, 1, - [copy_to_iter() is available]) - ],[ - AC_MSG_RESULT(no) - enable_vfs_iov_iter="no" - ]) - - AC_MSG_CHECKING([whether copy_from_iter() is available]) - ZFS_LINUX_TEST_RESULT([copy_from_iter], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_COPY_FROM_ITER, 1, - [copy_from_iter() is available]) - ],[ - AC_MSG_RESULT(no) - enable_vfs_iov_iter="no" ]) dnl # diff --git a/config/kernel-vfs-iterate.m4 b/config/kernel-vfs-iterate.m4 index 2e396daa1..7e2a9f0cb 100644 --- a/config/kernel-vfs-iterate.m4 +++ b/config/kernel-vfs-iterate.m4 @@ -24,17 +24,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [ #error "RHEL 7.5, FMODE_KABI_ITERATE interface" #endif ],[]) - - ZFS_LINUX_TEST_SRC([file_operations_readdir], [ - #include - static int readdir(struct file *filp, void *entry, - filldir_t func) { return 0; } - - static const struct file_operations fops - __attribute__ ((unused)) = { - .readdir = readdir, - }; - ],[]) ]) AC_DEFUN([ZFS_AC_KERNEL_VFS_ITERATE], [ @@ -66,18 +55,6 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_ITERATE], [ [fops->iterate() is available]) ],[ AC_MSG_RESULT(no) - - dnl # - dnl # readdir interface introduced - dnl # - AC_MSG_CHECKING([whether fops->readdir() is available]) - ZFS_LINUX_TEST_RESULT([file_operations_readdir], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_VFS_READDIR, 1, - [fops->readdir() is available]) - ],[ - ZFS_LINUX_TEST_ERROR([vfs_iterate]) - ]) ]) ]) ]) diff --git a/config/kernel-xattr-handler.m4 b/config/kernel-xattr-handler.m4 index 32f58c70a..5d4eb567c 100644 --- a/config/kernel-xattr-handler.m4 +++ b/config/kernel-xattr-handler.m4 @@ -402,32 +402,6 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_LIST], [ ]) ]) -dnl # -dnl # 3.7 API change, -dnl # The posix_acl_{from,to}_xattr functions gained a new -dnl # parameter: user_ns -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_FROM_XATTR_USERNS], [ - ZFS_LINUX_TEST_SRC([posix_acl_from_xattr_userns], [ - #include - #include - #include - ],[ - posix_acl_from_xattr(&init_user_ns, NULL, 0); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_FROM_XATTR_USERNS], [ - AC_MSG_CHECKING([whether posix_acl_from_xattr() needs user_ns]) - ZFS_LINUX_TEST_RESULT([posix_acl_from_xattr_userns], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_POSIX_ACL_FROM_XATTR_USERNS, 1, - [posix_acl_from_xattr() needs user_ns]) - ],[ - ZFS_LINUX_TEST_ERROR([posix_acl_from_xattr()]) - ]) -]) - dnl # dnl # 4.9 API change, dnl # iops->{set,get,remove}xattr and generic_{set,get,remove}xattr are @@ -462,7 +436,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR], [ ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST - ZFS_AC_KERNEL_SRC_POSIX_ACL_FROM_XATTR_USERNS ZFS_AC_KERNEL_SRC_GENERIC_SETXATTR ]) @@ -472,6 +445,5 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR], [ ZFS_AC_KERNEL_XATTR_HANDLER_GET ZFS_AC_KERNEL_XATTR_HANDLER_SET ZFS_AC_KERNEL_XATTR_HANDLER_LIST - ZFS_AC_KERNEL_POSIX_ACL_FROM_XATTR_USERNS ZFS_AC_KERNEL_GENERIC_SETXATTR ]) diff --git a/config/kernel-zlib.m4 b/config/kernel-zlib.m4 deleted file mode 100644 index 752d38838..000000000 --- a/config/kernel-zlib.m4 +++ /dev/null @@ -1,26 +0,0 @@ -dnl # -dnl # 2.6.39 API compat, -dnl -dnl # The function zlib_deflate_workspacesize() now take 2 arguments. -dnl # This was done to avoid always having to allocate the maximum size -dnl # workspace (268K). The caller can now specific the windowBits and -dnl # memLevel compression parameters to get a smaller workspace. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], [ - ZFS_LINUX_TEST_SRC([2args_zlib_deflate_workspacesize], [ - #include - ],[ - return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], [ - AC_MSG_CHECKING([whether zlib_deflate_workspacesize() wants 2 args]) - ZFS_LINUX_TEST_RESULT([2args_zlib_deflate_workspacesize], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE, 1, - [zlib_deflate_workspacesize() wants 2 args]) - ],[ - ZFS_LINUX_TEST_ERROR([zlib_deflate_workspacesize()]) - ]) -]) diff --git a/config/kernel.m4 b/config/kernel.m4 index 17d8694ce..3164d631d 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -45,8 +45,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_FALLOCATE ZFS_AC_KERNEL_SRC_FADVISE ZFS_AC_KERNEL_SRC_GENERIC_FADVISE - ZFS_AC_KERNEL_SRC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE - ZFS_AC_KERNEL_SRC_RWSEM ZFS_AC_KERNEL_SRC_SCHED ZFS_AC_KERNEL_SRC_USLEEP_RANGE ZFS_AC_KERNEL_SRC_KMEM_CACHE @@ -139,7 +137,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_KTIME ZFS_AC_KERNEL_SRC_TOTALRAM_PAGES_FUNC ZFS_AC_KERNEL_SRC_TOTALHIGH_PAGES - ZFS_AC_KERNEL_SRC_KSTRTOUL ZFS_AC_KERNEL_SRC_PERCPU ZFS_AC_KERNEL_SRC_CPU_HOTPLUG ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR @@ -199,8 +196,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_FALLOCATE ZFS_AC_KERNEL_FADVISE ZFS_AC_KERNEL_GENERIC_FADVISE - ZFS_AC_KERNEL_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE - ZFS_AC_KERNEL_RWSEM ZFS_AC_KERNEL_SCHED ZFS_AC_KERNEL_USLEEP_RANGE ZFS_AC_KERNEL_KMEM_CACHE @@ -293,7 +288,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_KTIME ZFS_AC_KERNEL_TOTALRAM_PAGES_FUNC ZFS_AC_KERNEL_TOTALHIGH_PAGES - ZFS_AC_KERNEL_KSTRTOUL ZFS_AC_KERNEL_PERCPU ZFS_AC_KERNEL_CPU_HOTPLUG ZFS_AC_KERNEL_GENERIC_FILLATTR