mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
config: remove HAVE_CLEAR_INODE and HAVE_EVICT_INODE
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
609559e5b9
commit
147c82bd5e
@ -1,39 +0,0 @@
|
||||
dnl #
|
||||
dnl # 3.5.0 API change
|
||||
dnl # torvalds/linux@dbd5768f87ff6fb0a4fe09c4d7b6c4a24de99430 and
|
||||
dnl # torvalds/linux@7994e6f7254354e03028a11f98a27bd67dace9f1 reworked
|
||||
dnl # where inode_sync_wait() is called.
|
||||
dnl #
|
||||
dnl # Prior to these changes it would occur in end_writeback() but due
|
||||
dnl # to various issues (described in the above commits) it has been
|
||||
dnl # moved to evict(). This changes the ordering is which sync occurs
|
||||
dnl # but otherwise doesn't impact the zpl implementation.
|
||||
dnl #
|
||||
dnl # The major impact here is the renaming of end_writeback() to
|
||||
dnl # clear_inode(). However, care must be taken when detecting this
|
||||
dnl # API change because as recently as 2.6.35 there was a clear_inode()
|
||||
dnl # function. However, it was made obsolete by the evict_inode() API
|
||||
dnl # change at the same time.
|
||||
dnl #
|
||||
dnl # Therefore, to ensure we have the correct API we only allow the
|
||||
dnl # clear_inode() compatibility code to be defined iff the evict_inode()
|
||||
dnl # functionality is also detected.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_CLEAR_INODE], [
|
||||
ZFS_LINUX_TEST_SRC([clear_inode], [
|
||||
#include <linux/fs.h>
|
||||
], [
|
||||
clear_inode(NULL);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_CLEAR_INODE], [
|
||||
AC_MSG_CHECKING([whether clear_inode() is available])
|
||||
ZFS_LINUX_TEST_RESULT_SYMBOL([clear_inode],
|
||||
[clear_inode], [fs/inode.c], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_CLEAR_INODE, 1, [clear_inode() is available])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
@ -1,24 +0,0 @@
|
||||
dnl #
|
||||
dnl # 2.6.36 API change
|
||||
dnl # The sops->delete_inode() and sops->clear_inode() callbacks have
|
||||
dnl # replaced by a single sops->evict_inode() callback.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_EVICT_INODE], [
|
||||
ZFS_LINUX_TEST_SRC([evict_inode], [
|
||||
#include <linux/fs.h>
|
||||
static void evict_inode (struct inode * t) { return; }
|
||||
static struct super_operations sops __attribute__ ((unused)) = {
|
||||
.evict_inode = evict_inode,
|
||||
};
|
||||
],[])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_EVICT_INODE], [
|
||||
AC_MSG_CHECKING([whether sops->evict_inode() exists])
|
||||
ZFS_LINUX_TEST_RESULT([evict_inode], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_EVICT_INODE, 1, [sops->evict_inode() exists])
|
||||
],[
|
||||
ZFS_LINUX_TEST_ERROR([evict_inode])
|
||||
])
|
||||
])
|
@ -80,7 +80,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
||||
ZFS_AC_KERNEL_SRC_FILEMAP
|
||||
ZFS_AC_KERNEL_SRC_FSYNC
|
||||
ZFS_AC_KERNEL_SRC_AIO_FSYNC
|
||||
ZFS_AC_KERNEL_SRC_EVICT_INODE
|
||||
ZFS_AC_KERNEL_SRC_DIRTY_INODE
|
||||
ZFS_AC_KERNEL_SRC_SHRINKER
|
||||
ZFS_AC_KERNEL_SRC_MKDIR
|
||||
@ -93,7 +92,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
||||
ZFS_AC_KERNEL_SRC_AUTOMOUNT
|
||||
ZFS_AC_KERNEL_SRC_ENCODE_FH_WITH_INODE
|
||||
ZFS_AC_KERNEL_SRC_COMMIT_METADATA
|
||||
ZFS_AC_KERNEL_SRC_CLEAR_INODE
|
||||
ZFS_AC_KERNEL_SRC_SETATTR_PREPARE
|
||||
ZFS_AC_KERNEL_SRC_INSERT_INODE_LOCKED
|
||||
ZFS_AC_KERNEL_SRC_DENTRY
|
||||
@ -234,7 +232,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
||||
ZFS_AC_KERNEL_FILEMAP
|
||||
ZFS_AC_KERNEL_FSYNC
|
||||
ZFS_AC_KERNEL_AIO_FSYNC
|
||||
ZFS_AC_KERNEL_EVICT_INODE
|
||||
ZFS_AC_KERNEL_DIRTY_INODE
|
||||
ZFS_AC_KERNEL_SHRINKER
|
||||
ZFS_AC_KERNEL_MKDIR
|
||||
@ -247,7 +244,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
||||
ZFS_AC_KERNEL_AUTOMOUNT
|
||||
ZFS_AC_KERNEL_ENCODE_FH_WITH_INODE
|
||||
ZFS_AC_KERNEL_COMMIT_METADATA
|
||||
ZFS_AC_KERNEL_CLEAR_INODE
|
||||
ZFS_AC_KERNEL_SETATTR_PREPARE
|
||||
ZFS_AC_KERNEL_INSERT_INODE_LOCKED
|
||||
ZFS_AC_KERNEL_DENTRY
|
||||
|
@ -136,16 +136,6 @@ zpl_bdi_destroy(struct super_block *sb)
|
||||
#define SB_NOATIME MS_NOATIME
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 3.5 API change,
|
||||
* The clear_inode() function replaces end_writeback() and introduces an
|
||||
* ordering change regarding when the inode_sync_wait() occurs. See the
|
||||
* configure check in config/kernel-clear-inode.m4 for full details.
|
||||
*/
|
||||
#if defined(HAVE_EVICT_INODE) && !defined(HAVE_CLEAR_INODE)
|
||||
#define clear_inode(ip) end_writeback(ip)
|
||||
#endif /* HAVE_EVICT_INODE && !HAVE_CLEAR_INODE */
|
||||
|
||||
#if defined(SEEK_HOLE) && defined(SEEK_DATA) && !defined(HAVE_LSEEK_EXECUTE)
|
||||
static inline loff_t
|
||||
lseek_execute(
|
||||
|
Loading…
Reference in New Issue
Block a user