diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/kernel-xattr-handler.m4 | 25 | ||||
-rw-r--r-- | config/kernel.m4 | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/config/kernel-xattr-handler.m4 b/config/kernel-xattr-handler.m4 index e1881f68b..f6142871d 100644 --- a/config/kernel-xattr-handler.m4 +++ b/config/kernel-xattr-handler.m4 @@ -33,6 +33,31 @@ AC_DEFUN([ZFS_AC_KERNEL_CONST_XATTR_HANDLER], [ ]) dnl # +dnl # 4.5 API change, +dnl # struct xattr_handler added new member "name". +dnl # xattr_handler which matches to whole name rather than prefix should use +dnl # "name" instead of "prefix", e.g. "system.posix_acl_access" +dnl # +AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_NAME], [ + AC_MSG_CHECKING([whether xattr_handler has name]) + ZFS_LINUX_TRY_COMPILE([ + #include <linux/xattr.h> + + static const struct xattr_handler + xops __attribute__ ((unused)) = { + .name = XATTR_NAME_POSIX_ACL_ACCESS, + }; + ],[ + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_XATTR_HANDLER_NAME, 1, + [xattr_handler has name]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # dnl # Supported xattr handler get() interfaces checked newest to oldest. dnl # AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET], [ diff --git a/config/kernel.m4 b/config/kernel.m4 index c7996f501..800d782f1 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -32,6 +32,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ ZFS_AC_KERNEL_GET_GENDISK ZFS_AC_KERNEL_DISCARD_GRANULARITY ZFS_AC_KERNEL_CONST_XATTR_HANDLER + ZFS_AC_KERNEL_XATTR_HANDLER_NAME ZFS_AC_KERNEL_XATTR_HANDLER_GET ZFS_AC_KERNEL_XATTR_HANDLER_SET ZFS_AC_KERNEL_XATTR_HANDLER_LIST |