4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 only,
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License version 2 for more details (a copy is included
14 * in the LICENSE file that accompanied this code).
16 * You should have received a copy of the GNU General Public License
17 * version 2 along with this program; If not, see
18 * http://www.gnu.org/licenses/gpl-2.0.html
23 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Use is subject to license terms.
26 * Copyright (c) 2011, 2017, Intel Corporation.
29 * This file is part of Lustre, http://www.lustre.org/
30 * Lustre is a trademark of Sun Microsystems, Inc.
34 #include <linux/sched.h>
36 #include <linux/xattr.h>
37 #ifdef HAVE_LINUX_SELINUX_IS_ENABLED
38 #include <linux/selinux.h>
41 #define DEBUG_SUBSYSTEM S_LLITE
43 #include <obd_support.h>
44 #include <lustre_dlm.h>
45 #include <lustre_eacl.h>
46 #include <lustre_swab.h>
48 #include "llite_internal.h"
50 #ifndef HAVE_XATTR_HANDLER_NAME
51 static inline const char *xattr_prefix(const struct xattr_handler *handler)
53 return handler->prefix;
57 #ifdef HAVE_LINUX_SELINUX_IS_ENABLED
58 # define test_xattr_is_selinux_disabled(handler, name) \
59 ((handler)->flags == XATTR_SECURITY_T && \
60 !selinux_is_enabled() && \
61 strcmp((name), "selinux") == 0)
63 # define test_xattr_is_selinux_disabled(handler, name) \
64 ((handler)->flags == XATTR_SECURITY_T && \
65 strcmp((name), "selinux") == 0)
68 const struct xattr_handler *get_xattr_type(const char *name)
72 for (i = 0; ll_xattr_handlers[i]; i++) {
73 const char *prefix = xattr_prefix(ll_xattr_handlers[i]);
74 size_t prefix_len = strlen(prefix);
76 if (!strncmp(prefix, name, prefix_len))
77 return ll_xattr_handlers[i];
83 static int xattr_type_filter(struct ll_sb_info *sbi,
84 const struct xattr_handler *handler)
86 /* No handler means XATTR_OTHER_T */
90 if ((handler->flags == XATTR_ACL_ACCESS_T ||
91 handler->flags == XATTR_ACL_DEFAULT_T) &&
92 !(sbi->ll_flags & LL_SBI_ACL))
95 if (handler->flags == XATTR_USER_T &&
96 !(sbi->ll_flags & LL_SBI_USER_XATTR))
99 if (handler->flags == XATTR_TRUSTED_T &&
100 !capable(CFS_CAP_SYS_ADMIN))
106 static int ll_xattr_set_common(const struct xattr_handler *handler,
107 struct dentry *dentry, struct inode *inode,
108 const char *name, const void *value, size_t size,
111 struct ll_sb_info *sbi = ll_i2sbi(inode);
112 struct ptlrpc_request *req = NULL;
113 const char *pv = value;
115 ktime_t kstart = ktime_get();
120 /* When setxattr() is called with a size of 0 the value is
121 * unconditionally replaced by "". When removexattr() is
122 * called we get a NULL value and XATTR_REPLACE for flags. */
123 if (!value && flags == XATTR_REPLACE)
124 valid = OBD_MD_FLXATTRRM;
126 valid = OBD_MD_FLXATTR;
128 /* FIXME: enable IMA when the conditions are ready */
129 if (handler->flags == XATTR_SECURITY_T &&
130 (!strcmp(name, "ima") || !strcmp(name, "evm")))
133 rc = xattr_type_filter(sbi, handler);
137 if ((handler->flags == XATTR_ACL_ACCESS_T ||
138 handler->flags == XATTR_ACL_DEFAULT_T) &&
139 !inode_owner_or_capable(inode))
142 /* b10667: ignore lustre special xattr for now */
143 if (!strcmp(name, "hsm") ||
144 ((handler->flags == XATTR_TRUSTED_T && !strcmp(name, "lov")) ||
145 (handler->flags == XATTR_LUSTRE_T && !strcmp(name, "lov"))))
148 /* LU-549: Disable security.selinux when selinux is disabled */
149 if (test_xattr_is_selinux_disabled(handler, name))
153 * In user.* namespace, only regular files and directories can have
154 * extended attributes.
156 if (handler->flags == XATTR_USER_T) {
157 if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode))
161 fullname = kasprintf(GFP_KERNEL, "%s%s", xattr_prefix(handler), name);
165 rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), valid, fullname,
166 pv, size, flags, ll_i2suppgid(inode), &req);
169 if (rc == -EOPNOTSUPP && handler->flags == XATTR_USER_T) {
170 LCONSOLE_INFO("Disabling user_xattr feature because it is not supported on the server\n");
171 sbi->ll_flags &= ~LL_SBI_USER_XATTR;
176 ptlrpc_req_finished(req);
178 ll_stats_ops_tally(ll_i2sbi(inode), valid == OBD_MD_FLXATTRRM ?
179 LPROC_LL_REMOVEXATTR : LPROC_LL_SETXATTR,
180 ktime_us_delta(ktime_get(), kstart));
185 static int get_hsm_state(struct inode *inode, u32 *hus_states)
187 struct md_op_data *op_data;
188 struct hsm_user_state *hus;
195 op_data = ll_prep_md_op_data(NULL, inode, NULL, NULL, 0, 0,
196 LUSTRE_OPC_ANY, hus);
197 if (!IS_ERR(op_data)) {
198 rc = obd_iocontrol(LL_IOC_HSM_STATE_GET, ll_i2mdexp(inode),
199 sizeof(*op_data), op_data, NULL);
201 *hus_states = hus->hus_states;
203 CDEBUG(D_VFSTRACE, "obd_iocontrol failed. rc = %d\n",
206 ll_finish_md_op_data(op_data);
208 rc = PTR_ERR(op_data);
209 CDEBUG(D_VFSTRACE, "Could not prepare the opdata. rc = %d\n",
216 static int ll_adjust_lum(struct inode *inode, struct lov_user_md *lump, size_t size)
218 struct lov_comp_md_v1 *comp_v1 = (struct lov_comp_md_v1 *)lump;
219 struct lov_user_md *v1 = lump;
220 bool need_clear_release = false;
221 bool release_checked = false;
222 bool is_composite = false;
230 if (lump->lmm_magic == LOV_USER_MAGIC_COMP_V1) {
231 if (size < sizeof(*comp_v1))
234 entry_count = comp_v1->lcm_entry_count;
235 if (size < offsetof(typeof(*comp_v1), lcm_entries[entry_count]))
240 for (i = 0; i < entry_count; i++) {
241 if (lump->lmm_magic == LOV_USER_MAGIC_COMP_V1) {
244 if (comp_v1->lcm_entries[i].lcme_offset + sizeof(*v1) >
248 ptr += comp_v1->lcm_entries[i].lcme_offset;
249 v1 = (struct lov_user_md *)ptr;
253 * Attributes that are saved via getxattr will always
254 * have the stripe_offset as 0. Instead, the MDS
255 * should be allowed to pick the starting OST index.
258 if (!is_composite && v1->lmm_stripe_offset == 0)
259 v1->lmm_stripe_offset = -1;
261 /* Avoid anyone directly setting the RELEASED flag. */
262 if (v1->lmm_pattern & LOV_PATTERN_F_RELEASED) {
263 if (!release_checked) {
266 rc = get_hsm_state(inode, &state);
270 if (!(state & HS_ARCHIVED))
271 need_clear_release = true;
272 release_checked = true;
274 if (need_clear_release)
275 v1->lmm_pattern ^= LOV_PATTERN_F_RELEASED;
282 static int ll_setstripe_ea(struct dentry *dentry, struct lov_user_md *lump,
285 struct inode *inode = dentry->d_inode;
289 * It is possible to set an xattr to a "" value of zero size.
290 * For this case we are going to treat it as a removal.
295 if (size && size < sizeof(*lump)) {
296 /* ll_adjust_lum() or ll_lov_user_md_size() might access
297 * before size - just give up now.
301 rc = ll_adjust_lum(inode, lump, size);
305 if (lump && S_ISREG(inode->i_mode)) {
306 u64 it_flags = FMODE_WRITE;
309 lum_size = ll_lov_user_md_size(lump);
310 if (lum_size < 0 || size < lum_size)
313 rc = ll_lov_setstripe_ea_info(inode, dentry, it_flags, lump,
316 * b=10667: ignore -EEXIST.
317 * Silently eat error on setting trusted.lov/lustre.lov
318 * attribute for platforms that added the default option
319 * to copy all attributes in 'cp' command. Both rsync and
320 * tar --xattrs also will try to set LOVEA for existing
325 } else if (S_ISDIR(inode->i_mode)) {
326 if (size != 0 && size < sizeof(struct lov_user_md))
329 rc = ll_dir_setstripe(inode, lump, 0);
335 static int ll_xattr_set(const struct xattr_handler *handler,
336 struct dentry *dentry, struct inode *inode,
337 const char *name, const void *value, size_t size,
340 ktime_t kstart = ktime_get();
341 int op_type = flags == XATTR_REPLACE ? LPROC_LL_REMOVEXATTR :
348 CDEBUG(D_VFSTRACE, "VFS Op:inode=" DFID "(%p), xattr %s\n",
349 PFID(ll_inode2fid(inode)), inode, name);
351 /* lustre/trusted.lov.xxx would be passed through xattr API */
352 if (!strcmp(name, "lov")) {
353 rc = ll_setstripe_ea(dentry, (struct lov_user_md *)value,
355 ll_stats_ops_tally(ll_i2sbi(inode), op_type,
356 ktime_us_delta(ktime_get(), kstart));
358 } else if (!strcmp(name, "lma") || !strcmp(name, "link")) {
359 ll_stats_ops_tally(ll_i2sbi(inode), op_type,
360 ktime_us_delta(ktime_get(), kstart));
364 if (strncmp(name, "lov.", 4) == 0 &&
365 (__swab32(((struct lov_user_md *)value)->lmm_magic) &
366 le32_to_cpu(LOV_MAGIC_MASK)) == le32_to_cpu(LOV_MAGIC_MAGIC))
367 lustre_swab_lov_user_md((struct lov_user_md *)value, 0);
369 return ll_xattr_set_common(handler, dentry, inode, name, value, size,
373 int ll_xattr_list(struct inode *inode, const char *name, int type, void *buffer,
374 size_t size, u64 valid)
376 struct ll_inode_info *lli = ll_i2info(inode);
377 struct ll_sb_info *sbi = ll_i2sbi(inode);
378 struct ptlrpc_request *req = NULL;
383 if (sbi->ll_xattr_cache_enabled && type != XATTR_ACL_ACCESS_T &&
384 (type != XATTR_SECURITY_T || strcmp(name, "security.selinux"))) {
385 rc = ll_xattr_cache_get(inode, name, buffer, size, valid);
387 goto getxattr_nocache;
391 /* Add "system.posix_acl_access" to the list */
392 if (lli->lli_posix_acl && valid & OBD_MD_FLXATTRLS) {
394 rc += sizeof(XATTR_NAME_ACL_ACCESS);
395 } else if (size - rc >= sizeof(XATTR_NAME_ACL_ACCESS)) {
396 memcpy(buffer + rc, XATTR_NAME_ACL_ACCESS,
397 sizeof(XATTR_NAME_ACL_ACCESS));
398 rc += sizeof(XATTR_NAME_ACL_ACCESS);
400 GOTO(out_xattr, rc = -ERANGE);
405 rc = md_getxattr(sbi->ll_md_exp, ll_inode2fid(inode), valid,
410 /* only detect the xattr size */
415 GOTO(out, rc = -ERANGE);
417 /* do not need swab xattr data */
418 xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA,
421 GOTO(out, rc = -EPROTO);
423 memcpy(buffer, xdata, rc);
429 if (rc == -EOPNOTSUPP && type == XATTR_USER_T) {
430 LCONSOLE_INFO("%s: disabling user_xattr feature because "
431 "it is not supported on the server: rc = %d\n",
433 sbi->ll_flags &= ~LL_SBI_USER_XATTR;
436 ptlrpc_req_finished(req);
440 static int ll_xattr_get_common(const struct xattr_handler *handler,
441 struct dentry *dentry,
443 const char *name, void *buffer, size_t size)
445 struct ll_sb_info *sbi = ll_i2sbi(inode);
446 ktime_t kstart = ktime_get();
452 rc = xattr_type_filter(sbi, handler);
456 /* LU-549: Disable security.selinux when selinux is disabled */
457 if (test_xattr_is_selinux_disabled(handler, name))
460 #ifdef CONFIG_LUSTRE_FS_POSIX_ACL
461 /* posix acl is under protection of LOOKUP lock. when calling to this,
462 * we just have path resolution to the target inode, so we have great
463 * chance that cached ACL is uptodate.
465 if (handler->flags == XATTR_ACL_ACCESS_T) {
466 struct ll_inode_info *lli = ll_i2info(inode);
467 struct posix_acl *acl;
469 spin_lock(&lli->lli_lock);
470 acl = posix_acl_dup(lli->lli_posix_acl);
471 spin_unlock(&lli->lli_lock);
476 rc = posix_acl_to_xattr(&init_user_ns, acl, buffer, size);
477 posix_acl_release(acl);
480 if (handler->flags == XATTR_ACL_DEFAULT_T && !S_ISDIR(inode->i_mode))
484 fullname = kasprintf(GFP_KERNEL, "%s%s", xattr_prefix(handler), name);
488 rc = ll_xattr_list(inode, fullname, handler->flags, buffer, size,
491 ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETXATTR,
492 ktime_us_delta(ktime_get(), kstart));
497 static ssize_t ll_getxattr_lov(struct inode *inode, void *buf, size_t buf_size)
501 if (S_ISREG(inode->i_mode)) {
502 struct cl_object *obj = ll_i2info(inode)->lli_clob;
503 struct cl_layout cl = {
504 .cl_buf.lb_buf = buf,
505 .cl_buf.lb_len = buf_size,
513 env = cl_env_get(&refcheck);
515 RETURN(PTR_ERR(env));
517 rc = cl_object_layout_get(env, obj, &cl);
522 GOTO(out_env, rc = -ENODATA);
529 LASSERT(buf && rc <= buf_size);
532 * Do not return layout gen for getxattr() since
533 * otherwise it would confuse tar --xattr by
534 * recognizing layout gen as stripe offset when the
535 * file is restored. See LU-2809.
537 if ((((struct lov_mds_md *)buf)->lmm_magic &
538 __swab32(LOV_MAGIC_MAGIC)) == __swab32(LOV_MAGIC_MAGIC))
539 lustre_swab_lov_user_md((struct lov_user_md *)buf,
542 switch (((struct lov_mds_md *)buf)->lmm_magic) {
545 case LOV_MAGIC_SPECIFIC:
546 ((struct lov_mds_md *)buf)->lmm_layout_gen = 0;
548 case LOV_MAGIC_COMP_V1:
549 case LOV_MAGIC_FOREIGN:
552 CERROR("Invalid LOV magic %08x\n",
553 ((struct lov_mds_md *)buf)->lmm_magic);
554 GOTO(out_env, rc = -EINVAL);
558 cl_env_put(env, &refcheck);
561 } else if (S_ISDIR(inode->i_mode)) {
562 struct ptlrpc_request *req = NULL;
563 struct ptlrpc_request *root_req = NULL;
564 struct lov_mds_md *lmm = NULL;
567 rc = ll_dir_getstripe_default(inode, (void **)&lmm, &lmm_size,
573 GOTO(out_req, rc = lmm_size);
575 if (buf_size < lmm_size)
576 GOTO(out_req, rc = -ERANGE);
578 memcpy(buf, lmm, lmm_size);
579 GOTO(out_req, rc = lmm_size);
582 ptlrpc_req_finished(req);
584 ptlrpc_req_finished(root_req);
592 static int ll_xattr_get(const struct xattr_handler *handler,
593 struct dentry *dentry, struct inode *inode,
594 const char *name, void *buffer, size_t size)
599 CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), xattr %s\n",
600 PFID(ll_inode2fid(inode)), inode, name);
602 if (!strcmp(name, "lov")) {
603 ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETXATTR, 1);
605 return ll_getxattr_lov(inode, buffer, size);
608 return ll_xattr_get_common(handler, dentry, inode, name, buffer, size);
611 ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
613 struct inode *inode = dentry->d_inode;
614 struct ll_sb_info *sbi = ll_i2sbi(inode);
615 ktime_t kstart = ktime_get();
622 CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
623 PFID(ll_inode2fid(inode)), inode);
625 rc = ll_xattr_list(inode, NULL, XATTR_OTHER_T, buffer, size,
631 * If we're being called to get the size of the xattr list
632 * (size == 0) then just assume that a lustre.lov xattr
642 len = strnlen(xattr_name, rem - 1) + 1;
644 if (!xattr_type_filter(sbi, get_xattr_type(xattr_name))) {
645 /* Skip OK xattr type, leave it in buffer. */
651 * Move up remaining xattrs in buffer
652 * removing the xattr that is not OK.
654 memmove(xattr_name, xattr_name + len, rem);
658 rc2 = ll_getxattr_lov(inode, NULL, 0);
665 if (size < rc + sizeof(XATTR_LUSTRE_LOV))
668 memcpy(buffer + rc, XATTR_LUSTRE_LOV, sizeof(XATTR_LUSTRE_LOV));
671 ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LISTXATTR,
672 ktime_us_delta(ktime_get(), kstart));
674 RETURN(rc + sizeof(XATTR_LUSTRE_LOV));
677 #ifdef HAVE_XATTR_HANDLER_SIMPLIFIED
678 static int ll_xattr_get_common_4_3(const struct xattr_handler *handler,
679 struct dentry *dentry, const char *name,
680 void *buffer, size_t size)
682 return ll_xattr_get_common(handler, dentry, dentry->d_inode, name,
686 static int ll_xattr_get_4_3(const struct xattr_handler *handler,
687 struct dentry *dentry, const char *name,
688 void *buffer, size_t size)
690 return ll_xattr_get(handler, dentry, dentry->d_inode, name, buffer,
694 static int ll_xattr_set_common_4_3(const struct xattr_handler *handler,
695 struct dentry *dentry, const char *name,
696 const void *value, size_t size, int flags)
698 return ll_xattr_set_common(handler, dentry, dentry->d_inode, name,
702 static int ll_xattr_set_4_3(const struct xattr_handler *handler,
703 struct dentry *dentry, const char *name,
704 const void *value, size_t size, int flags)
706 return ll_xattr_set(handler, dentry, dentry->d_inode, name, value,
710 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
711 const struct xattr_handler *get_xattr_handler(int handler_flag)
715 while (ll_xattr_handlers[i]) {
716 if (ll_xattr_handlers[i]->flags == handler_flag)
717 return ll_xattr_handlers[i];
723 static int ll_xattr_get_common_3_11(struct dentry *dentry, const char *name,
724 void *buffer, size_t size, int handler_flags)
726 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
731 return ll_xattr_get_common(handler, dentry, dentry->d_inode, name,
735 static int ll_xattr_get_3_11(struct dentry *dentry, const char *name,
736 void *buffer, size_t size, int handler_flags)
738 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
743 return ll_xattr_get(handler, dentry, dentry->d_inode, name, buffer,
747 static int ll_xattr_set_common_3_11(struct dentry *dentry, const char *name,
748 const void *value, size_t size, int flags,
751 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
756 return ll_xattr_set_common(handler, dentry, dentry->d_inode, name,
760 static int ll_xattr_set_3_11(struct dentry *dentry, const char *name,
761 const void *value, size_t size, int flags,
764 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
769 return ll_xattr_set(handler, dentry, dentry->d_inode, name, value,
774 static const struct xattr_handler ll_user_xattr_handler = {
775 .prefix = XATTR_USER_PREFIX,
776 .flags = XATTR_USER_T,
777 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
778 .get = ll_xattr_get_common_4_3,
779 .set = ll_xattr_set_common_4_3,
780 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
781 .get = ll_xattr_get_common_3_11,
782 .set = ll_xattr_set_common_3_11,
784 .get = ll_xattr_get_common,
785 .set = ll_xattr_set_common,
789 static const struct xattr_handler ll_trusted_xattr_handler = {
790 .prefix = XATTR_TRUSTED_PREFIX,
791 .flags = XATTR_TRUSTED_T,
792 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
793 .get = ll_xattr_get_4_3,
794 .set = ll_xattr_set_4_3,
795 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
796 .get = ll_xattr_get_3_11,
797 .set = ll_xattr_set_3_11,
804 static const struct xattr_handler ll_security_xattr_handler = {
805 .prefix = XATTR_SECURITY_PREFIX,
806 .flags = XATTR_SECURITY_T,
807 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
808 .get = ll_xattr_get_common_4_3,
809 .set = ll_xattr_set_common_4_3,
810 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
811 .get = ll_xattr_get_common_3_11,
812 .set = ll_xattr_set_common_3_11,
814 .get = ll_xattr_get_common,
815 .set = ll_xattr_set_common,
819 static const struct xattr_handler ll_acl_access_xattr_handler = {
820 #ifdef HAVE_XATTR_HANDLER_NAME
821 .name = XATTR_NAME_POSIX_ACL_ACCESS,
823 .prefix = XATTR_NAME_POSIX_ACL_ACCESS,
825 .flags = XATTR_ACL_ACCESS_T,
826 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
827 .get = ll_xattr_get_common_4_3,
828 .set = ll_xattr_set_common_4_3,
829 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
830 .get = ll_xattr_get_common_3_11,
831 .set = ll_xattr_set_common_3_11,
833 .get = ll_xattr_get_common,
834 .set = ll_xattr_set_common,
838 static const struct xattr_handler ll_acl_default_xattr_handler = {
839 #ifdef HAVE_XATTR_HANDLER_NAME
840 .name = XATTR_NAME_POSIX_ACL_DEFAULT,
842 .prefix = XATTR_NAME_POSIX_ACL_DEFAULT,
844 .flags = XATTR_ACL_DEFAULT_T,
845 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
846 .get = ll_xattr_get_common_4_3,
847 .set = ll_xattr_set_common_4_3,
848 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
849 .get = ll_xattr_get_common_3_11,
850 .set = ll_xattr_set_common_3_11,
852 .get = ll_xattr_get_common,
853 .set = ll_xattr_set_common,
857 static const struct xattr_handler ll_lustre_xattr_handler = {
858 .prefix = XATTR_LUSTRE_PREFIX,
859 .flags = XATTR_LUSTRE_T,
860 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
861 .get = ll_xattr_get_4_3,
862 .set = ll_xattr_set_4_3,
863 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
864 .get = ll_xattr_get_3_11,
865 .set = ll_xattr_set_3_11,
872 const struct xattr_handler *ll_xattr_handlers[] = {
873 &ll_user_xattr_handler,
874 &ll_trusted_xattr_handler,
875 &ll_security_xattr_handler,
876 #ifdef CONFIG_LUSTRE_FS_POSIX_ACL
877 &ll_acl_access_xattr_handler,
878 &ll_acl_default_xattr_handler,
880 &ll_lustre_xattr_handler,