diff options
author | Brian Behlendorf <[email protected]> | 2018-02-08 14:27:59 -0800 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2018-03-14 16:10:36 -0700 |
commit | 310e63dfd18f59ad583631dfa2f55d40cedf1415 (patch) | |
tree | d0051541401c04e91514770e92aa3aa0f69c31b7 /config | |
parent | a196b3bc3dcc14bda32b2fbed40d5e436319aca6 (diff) |
Linux 4.16 compat: inode_set_iversion()
A new interface was added to manipulate the version field of an
inode. Add a inode_set_iversion() wrapper for older kernels and
use the new interface when available.
The i_version field was dropped from the trace point due to the
switch to an atomic64_t i_version type.
Reviewed-by: Olaf Faaland <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: Chunwei Chen <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #7148
Diffstat (limited to 'config')
-rw-r--r-- | config/kernel-inode-set-iversion.m4 | 19 | ||||
-rw-r--r-- | config/kernel.m4 | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/config/kernel-inode-set-iversion.m4 b/config/kernel-inode-set-iversion.m4 new file mode 100644 index 000000000..9a7d7890e --- /dev/null +++ b/config/kernel-inode-set-iversion.m4 @@ -0,0 +1,19 @@ +dnl # +dnl # 4.16 API change +dnl # inode_set_iversion introduced to set i_version +dnl # +AC_DEFUN([ZFS_AC_KERNEL_INODE_SET_IVERSION], [ + AC_MSG_CHECKING([whether inode_set_iversion() exists]) + ZFS_LINUX_TRY_COMPILE([ + #include <linux/iversion.h> + ],[ + struct inode inode; + inode_set_iversion(&inode, 1); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INODE_SET_IVERSION, 1, + [inode_set_iversion() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel.m4 b/config/kernel.m4 index b759ccd39..b83f021e8 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -65,6 +65,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL ZFS_AC_KERNEL_INODE_OPERATIONS_GETATTR ZFS_AC_KERNEL_INODE_SET_FLAGS + ZFS_AC_KERNEL_INODE_SET_IVERSION ZFS_AC_KERNEL_GET_ACL_HANDLE_CACHE ZFS_AC_KERNEL_SHOW_OPTIONS ZFS_AC_KERNEL_FILE_INODE |