mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
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 <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
2b069768ab
commit
02f4b63db9
@ -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 <CoreFoundation/CFPreferences.h>]],
|
||||
[[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 <CoreFoundation/CFLocale.h>]],
|
||||
[[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 <CoreFoundation/CFLocale.h>]],
|
||||
[[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])
|
||||
])
|
@ -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
|
||||
|
@ -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 <linux/dcache.h>
|
||||
|
||||
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
|
||||
])
|
||||
|
@ -37,19 +37,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
|
||||
.setattr = test_setattr,
|
||||
};
|
||||
],[])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_setattr], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
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)
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
@ -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 <linux/kernel.h>
|
||||
],[
|
||||
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()])
|
||||
])
|
||||
])
|
@ -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 <linux/blkdev.h>
|
||||
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 <linux/blkdev.h>
|
||||
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])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
@ -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()])
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
@ -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 <linux/rwsem.h>
|
||||
],[
|
||||
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 <linux/rwsem.h>
|
||||
],[
|
||||
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
|
||||
])
|
@ -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 <linux/mm.h>
|
||||
],[
|
||||
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
|
||||
])
|
||||
|
@ -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 <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
],[
|
||||
int type __attribute__ ((unused)) = ITER_KVEC;
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([iov_iter_advance], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
],[
|
||||
struct iov_iter iter = { 0 };
|
||||
size_t advance = 512;
|
||||
|
||||
iov_iter_advance(&iter, advance);
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([iov_iter_revert], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
],[
|
||||
struct iov_iter iter = { 0 };
|
||||
size_t revert = 512;
|
||||
|
||||
iov_iter_revert(&iter, revert);
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([iov_iter_fault_in_readable], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
],[
|
||||
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 <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
@ -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 <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
],[
|
||||
struct iov_iter iter = { 0 };
|
||||
size_t bytes __attribute__ ((unused));
|
||||
|
||||
bytes = iov_iter_count(&iter);
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([copy_to_iter], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
],[
|
||||
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 <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
],[
|
||||
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 <linux/uio.h>
|
||||
], [
|
||||
@ -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 #
|
||||
|
@ -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 <linux/fs.h>
|
||||
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])
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
@ -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 <linux/cred.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/posix_acl_xattr.h>
|
||||
],[
|
||||
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
|
||||
])
|
||||
|
@ -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 <linux/zlib.h>
|
||||
],[
|
||||
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()])
|
||||
])
|
||||
])
|
@ -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
|
||||
@ -142,7 +140,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
|
||||
@ -202,8 +199,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
|
||||
@ -299,7 +294,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
|
||||
|
Loading…
Reference in New Issue
Block a user