+#endif
+
+static const struct xattr_handler ll_user_xattr_handler = {
+ .prefix = XATTR_USER_PREFIX,
+ .flags = XATTR_USER_T,
+#if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
+ .get = ll_xattr_get_common_4_3,
+ .set = ll_xattr_set_common_4_3,
+#elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
+ .get = ll_xattr_get_common_3_11,
+ .set = ll_xattr_set_common_3_11,
+#else
+ .get = ll_xattr_get_common,
+ .set = ll_xattr_set_common,
+#endif
+};
+
+static const struct xattr_handler ll_trusted_xattr_handler = {
+ .prefix = XATTR_TRUSTED_PREFIX,
+ .flags = XATTR_TRUSTED_T,
+#if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
+ .get = ll_xattr_get_4_3,
+ .set = ll_xattr_set_4_3,
+#elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
+ .get = ll_xattr_get_3_11,
+ .set = ll_xattr_set_3_11,
+#else
+ .get = ll_xattr_get,
+ .set = ll_xattr_set,
+#endif
+};
+
+static const struct xattr_handler ll_security_xattr_handler = {
+ .prefix = XATTR_SECURITY_PREFIX,
+ .flags = XATTR_SECURITY_T,
+#if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
+ .get = ll_xattr_get_common_4_3,
+ .set = ll_xattr_set_common_4_3,
+#elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
+ .get = ll_xattr_get_common_3_11,
+ .set = ll_xattr_set_common_3_11,
+#else
+ .get = ll_xattr_get_common,
+ .set = ll_xattr_set_common,
+#endif
+};
+
+static const struct xattr_handler ll_acl_access_xattr_handler = {
+#ifdef HAVE_XATTR_HANDLER_NAME
+ .name = XATTR_NAME_POSIX_ACL_ACCESS,
+#else
+ .prefix = XATTR_NAME_POSIX_ACL_ACCESS,
+#endif
+ .flags = XATTR_ACL_ACCESS_T,
+#if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
+ .get = ll_xattr_get_common_4_3,
+ .set = ll_xattr_set_common_4_3,
+#elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
+ .get = ll_xattr_get_common_3_11,
+ .set = ll_xattr_set_common_3_11,
+#else
+ .get = ll_xattr_get_common,
+ .set = ll_xattr_set_common,
+#endif
+};
+
+static const struct xattr_handler ll_acl_default_xattr_handler = {
+#ifdef HAVE_XATTR_HANDLER_NAME
+ .name = XATTR_NAME_POSIX_ACL_DEFAULT,
+#else
+ .prefix = XATTR_NAME_POSIX_ACL_DEFAULT,
+#endif
+ .flags = XATTR_ACL_DEFAULT_T,
+#if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
+ .get = ll_xattr_get_common_4_3,
+ .set = ll_xattr_set_common_4_3,
+#elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
+ .get = ll_xattr_get_common_3_11,
+ .set = ll_xattr_set_common_3_11,
+#else
+ .get = ll_xattr_get_common,
+ .set = ll_xattr_set_common,
+#endif
+};
+
+static const struct xattr_handler ll_lustre_xattr_handler = {
+ .prefix = XATTR_LUSTRE_PREFIX,
+ .flags = XATTR_LUSTRE_T,
+#if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
+ .get = ll_xattr_get_4_3,
+ .set = ll_xattr_set_4_3,
+#elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
+ .get = ll_xattr_get_3_11,
+ .set = ll_xattr_set_3_11,
+#else
+ .get = ll_xattr_get,
+ .set = ll_xattr_set,
+#endif
+};
+
+const struct xattr_handler *ll_xattr_handlers[] = {
+ &ll_user_xattr_handler,
+ &ll_trusted_xattr_handler,
+ &ll_security_xattr_handler,
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
+ &ll_acl_access_xattr_handler,
+ &ll_acl_default_xattr_handler,
+#endif
+ &ll_lustre_xattr_handler,
+ NULL,
+};