]> git.proxmox.com Git - mirror_zfs.git/blobdiff - config/kernel-xattr-handler.m4
Don't assume pthread_t is uint_t for portability
[mirror_zfs.git] / config / kernel-xattr-handler.m4
index ce18eaf9caf633c9752a6c07b9f94267023a1dc7..0b61b85b1d45ecb421d27a00db9cefc9db45ef30 100644 (file)
@@ -57,6 +57,31 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_NAME], [
        ])
 ])
 
+dnl #
+dnl # 4.9 API change,
+dnl # iops->{set,get,remove}xattr and generic_{set,get,remove}xattr are
+dnl # removed. xattr operations will directly go through sb->s_xattr.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_HAVE_GENERIC_SETXATTR], [
+       AC_MSG_CHECKING([whether generic_setxattr() exists])
+       ZFS_LINUX_TRY_COMPILE([
+               #include <linux/fs.h>
+               #include <linux/xattr.h>
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .setxattr = generic_setxattr
+               };
+       ],[
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_GENERIC_SETXATTR, 1,
+                   [generic_setxattr() exists])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+])
+
 dnl #
 dnl # Supported xattr handler get() interfaces checked newest to oldest.
 dnl #
@@ -271,7 +296,7 @@ dnl #
 AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_LIST], [
        dnl # 4.5 API change,
        dnl # The xattr_handler->list() callback was changed to take only a
-       dnl # dentry and it only needs to return if it's accessable.
+       dnl # dentry and it only needs to return if it's accessible.
        AC_MSG_CHECKING([whether xattr_handler->list() wants simple])
        ZFS_LINUX_TRY_COMPILE([
                #include <linux/xattr.h>