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_swab.h>
47 #include "llite_internal.h"
49 #ifndef HAVE_XATTR_HANDLER_NAME
50 static inline const char *xattr_prefix(const struct xattr_handler *handler)
52 return handler->prefix;
56 const struct xattr_handler *get_xattr_type(const char *name)
60 for (i = 0; ll_xattr_handlers[i]; i++) {
61 const char *prefix = xattr_prefix(ll_xattr_handlers[i]);
62 size_t prefix_len = strlen(prefix);
64 if (!strncmp(prefix, name, prefix_len))
65 return ll_xattr_handlers[i];
71 static int xattr_type_filter(struct ll_sb_info *sbi,
72 const struct xattr_handler *handler)
74 /* No handler means XATTR_OTHER_T */
78 if ((handler->flags == XATTR_ACL_ACCESS_T ||
79 handler->flags == XATTR_ACL_DEFAULT_T) &&
80 !(sbi->ll_flags & LL_SBI_ACL))
83 if (handler->flags == XATTR_USER_T &&
84 !(sbi->ll_flags & LL_SBI_USER_XATTR))
87 if (handler->flags == XATTR_TRUSTED_T &&
88 !capable(CAP_SYS_ADMIN))
94 static int ll_xattr_set_common(const struct xattr_handler *handler,
95 struct dentry *dentry, struct inode *inode,
96 const char *name, const void *value, size_t size,
99 struct ll_sb_info *sbi = ll_i2sbi(inode);
100 struct ptlrpc_request *req = NULL;
101 const char *pv = value;
103 ktime_t kstart = ktime_get();
108 /* When setxattr() is called with a size of 0 the value is
109 * unconditionally replaced by "". When removexattr() is
110 * called we get a NULL value and XATTR_REPLACE for flags. */
111 if (!value && flags == XATTR_REPLACE)
112 valid = OBD_MD_FLXATTRRM;
114 valid = OBD_MD_FLXATTR;
116 /* FIXME: enable IMA when the conditions are ready */
117 if (handler->flags == XATTR_SECURITY_T &&
118 (!strcmp(name, "ima") || !strcmp(name, "evm")))
121 rc = xattr_type_filter(sbi, handler);
125 if ((handler->flags == XATTR_ACL_ACCESS_T ||
126 handler->flags == XATTR_ACL_DEFAULT_T) &&
127 !inode_owner_or_capable(inode))
130 /* b10667: ignore lustre special xattr for now */
131 if (!strcmp(name, "hsm") ||
132 ((handler->flags == XATTR_TRUSTED_T && !strcmp(name, "lov")) ||
133 (handler->flags == XATTR_LUSTRE_T && !strcmp(name, "lov"))))
136 /* LU-549: Disable security.selinux when selinux is disabled */
137 if (handler->flags == XATTR_SECURITY_T && !selinux_is_enabled() &&
138 strcmp(name, "selinux") == 0)
142 * In user.* namespace, only regular files and directories can have
143 * extended attributes.
145 if (handler->flags == XATTR_USER_T) {
146 if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode))
150 /* Setting LL_XATTR_NAME_ENCRYPTION_CONTEXT xattr is only allowed
151 * when defining an encryption policy on a directory, ie when it
152 * comes from ll_set_context().
153 * When new files/dirs are created in an encrypted dir, the xattr
154 * is set directly in the create request.
156 if (handler->flags == XATTR_SECURITY_T &&
157 !strcmp(name, "c") &&
158 !test_and_clear_bit(LLIF_SET_ENC_CTX, &ll_i2info(inode)->lli_flags))
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 (handler->flags == XATTR_SECURITY_T && !selinux_is_enabled() &&
458 !strcmp(name, "selinux"))
461 #ifdef CONFIG_LUSTRE_FS_POSIX_ACL
462 /* posix acl is under protection of LOOKUP lock. when calling to this,
463 * we just have path resolution to the target inode, so we have great
464 * chance that cached ACL is uptodate.
466 if (handler->flags == XATTR_ACL_ACCESS_T) {
467 struct ll_inode_info *lli = ll_i2info(inode);
468 struct posix_acl *acl;
470 spin_lock(&lli->lli_lock);
471 acl = posix_acl_dup(lli->lli_posix_acl);
472 spin_unlock(&lli->lli_lock);
477 rc = posix_acl_to_xattr(&init_user_ns, acl, buffer, size);
478 posix_acl_release(acl);
481 if (handler->flags == XATTR_ACL_DEFAULT_T && !S_ISDIR(inode->i_mode))
485 fullname = kasprintf(GFP_KERNEL, "%s%s", xattr_prefix(handler), name);
489 rc = ll_xattr_list(inode, fullname, handler->flags, buffer, size,
492 ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETXATTR,
493 ktime_us_delta(ktime_get(), kstart));
498 static ssize_t ll_getxattr_lov(struct inode *inode, void *buf, size_t buf_size)
502 if (S_ISREG(inode->i_mode)) {
503 struct cl_object *obj = ll_i2info(inode)->lli_clob;
504 struct cl_layout cl = {
505 .cl_buf.lb_buf = buf,
506 .cl_buf.lb_len = buf_size,
514 env = cl_env_get(&refcheck);
516 RETURN(PTR_ERR(env));
518 rc = cl_object_layout_get(env, obj, &cl);
523 GOTO(out_env, rc = -ENODATA);
530 LASSERT(buf && rc <= buf_size);
533 * Do not return layout gen for getxattr() since
534 * otherwise it would confuse tar --xattr by
535 * recognizing layout gen as stripe offset when the
536 * file is restored. See LU-2809.
538 if ((((struct lov_mds_md *)buf)->lmm_magic &
539 __swab32(LOV_MAGIC_MAGIC)) == __swab32(LOV_MAGIC_MAGIC))
540 lustre_swab_lov_user_md((struct lov_user_md *)buf,
543 switch (((struct lov_mds_md *)buf)->lmm_magic) {
546 case LOV_MAGIC_SPECIFIC:
547 ((struct lov_mds_md *)buf)->lmm_layout_gen = 0;
549 case LOV_MAGIC_COMP_V1:
550 case LOV_MAGIC_FOREIGN:
553 CERROR("Invalid LOV magic %08x\n",
554 ((struct lov_mds_md *)buf)->lmm_magic);
555 GOTO(out_env, rc = -EINVAL);
559 cl_env_put(env, &refcheck);
562 } else if (S_ISDIR(inode->i_mode)) {
563 struct ptlrpc_request *req = NULL;
564 struct ptlrpc_request *root_req = NULL;
565 struct lov_mds_md *lmm = NULL;
568 rc = ll_dir_getstripe_default(inode, (void **)&lmm, &lmm_size,
574 GOTO(out_req, rc = lmm_size);
576 if (buf_size < lmm_size)
577 GOTO(out_req, rc = -ERANGE);
579 memcpy(buf, lmm, lmm_size);
580 GOTO(out_req, rc = lmm_size);
583 ptlrpc_req_finished(req);
585 ptlrpc_req_finished(root_req);
593 static int ll_xattr_get(const struct xattr_handler *handler,
594 struct dentry *dentry, struct inode *inode,
595 const char *name, void *buffer, size_t size)
600 CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), xattr %s\n",
601 PFID(ll_inode2fid(inode)), inode, name);
603 if (!strcmp(name, "lov")) {
604 ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETXATTR, 1);
606 return ll_getxattr_lov(inode, buffer, size);
609 return ll_xattr_get_common(handler, dentry, inode, name, buffer, size);
612 ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
614 struct inode *inode = dentry->d_inode;
615 struct ll_sb_info *sbi = ll_i2sbi(inode);
616 ktime_t kstart = ktime_get();
623 CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
624 PFID(ll_inode2fid(inode)), inode);
626 rc = ll_xattr_list(inode, NULL, XATTR_OTHER_T, buffer, size,
632 * If we're being called to get the size of the xattr list
633 * (size == 0) then just assume that a lustre.lov xattr
643 len = strnlen(xattr_name, rem - 1) + 1;
645 if (!xattr_type_filter(sbi, get_xattr_type(xattr_name))) {
646 /* Skip OK xattr type, leave it in buffer. */
652 * Move up remaining xattrs in buffer
653 * removing the xattr that is not OK.
655 memmove(xattr_name, xattr_name + len, rem);
659 rc2 = ll_getxattr_lov(inode, NULL, 0);
666 if (size < rc + sizeof(XATTR_LUSTRE_LOV))
669 memcpy(buffer + rc, XATTR_LUSTRE_LOV, sizeof(XATTR_LUSTRE_LOV));
672 ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LISTXATTR,
673 ktime_us_delta(ktime_get(), kstart));
675 RETURN(rc + sizeof(XATTR_LUSTRE_LOV));
678 #ifdef HAVE_XATTR_HANDLER_SIMPLIFIED
679 static int ll_xattr_get_common_4_3(const struct xattr_handler *handler,
680 struct dentry *dentry, const char *name,
681 void *buffer, size_t size)
683 return ll_xattr_get_common(handler, dentry, dentry->d_inode, name,
687 static int ll_xattr_get_4_3(const struct xattr_handler *handler,
688 struct dentry *dentry, const char *name,
689 void *buffer, size_t size)
691 return ll_xattr_get(handler, dentry, dentry->d_inode, name, buffer,
695 static int ll_xattr_set_common_4_3(const struct xattr_handler *handler,
696 struct dentry *dentry, const char *name,
697 const void *value, size_t size, int flags)
699 return ll_xattr_set_common(handler, dentry, dentry->d_inode, name,
703 static int ll_xattr_set_4_3(const struct xattr_handler *handler,
704 struct dentry *dentry, const char *name,
705 const void *value, size_t size, int flags)
707 return ll_xattr_set(handler, dentry, dentry->d_inode, name, value,
711 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
712 const struct xattr_handler *get_xattr_handler(int handler_flag)
716 while (ll_xattr_handlers[i]) {
717 if (ll_xattr_handlers[i]->flags == handler_flag)
718 return ll_xattr_handlers[i];
724 static int ll_xattr_get_common_3_11(struct dentry *dentry, const char *name,
725 void *buffer, size_t size, int handler_flags)
727 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
732 return ll_xattr_get_common(handler, dentry, dentry->d_inode, name,
736 static int ll_xattr_get_3_11(struct dentry *dentry, const char *name,
737 void *buffer, size_t size, int handler_flags)
739 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
744 return ll_xattr_get(handler, dentry, dentry->d_inode, name, buffer,
748 static int ll_xattr_set_common_3_11(struct dentry *dentry, const char *name,
749 const void *value, size_t size, int flags,
752 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
757 return ll_xattr_set_common(handler, dentry, dentry->d_inode, name,
761 static int ll_xattr_set_3_11(struct dentry *dentry, const char *name,
762 const void *value, size_t size, int flags,
765 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
770 return ll_xattr_set(handler, dentry, dentry->d_inode, name, value,
775 static const struct xattr_handler ll_user_xattr_handler = {
776 .prefix = XATTR_USER_PREFIX,
777 .flags = XATTR_USER_T,
778 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
779 .get = ll_xattr_get_common_4_3,
780 .set = ll_xattr_set_common_4_3,
781 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
782 .get = ll_xattr_get_common_3_11,
783 .set = ll_xattr_set_common_3_11,
785 .get = ll_xattr_get_common,
786 .set = ll_xattr_set_common,
790 static const struct xattr_handler ll_trusted_xattr_handler = {
791 .prefix = XATTR_TRUSTED_PREFIX,
792 .flags = XATTR_TRUSTED_T,
793 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
794 .get = ll_xattr_get_4_3,
795 .set = ll_xattr_set_4_3,
796 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
797 .get = ll_xattr_get_3_11,
798 .set = ll_xattr_set_3_11,
805 static const struct xattr_handler ll_security_xattr_handler = {
806 .prefix = XATTR_SECURITY_PREFIX,
807 .flags = XATTR_SECURITY_T,
808 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
809 .get = ll_xattr_get_common_4_3,
810 .set = ll_xattr_set_common_4_3,
811 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
812 .get = ll_xattr_get_common_3_11,
813 .set = ll_xattr_set_common_3_11,
815 .get = ll_xattr_get_common,
816 .set = ll_xattr_set_common,
820 static const struct xattr_handler ll_acl_access_xattr_handler = {
821 #ifdef HAVE_XATTR_HANDLER_NAME
822 .name = XATTR_NAME_POSIX_ACL_ACCESS,
824 .prefix = XATTR_NAME_POSIX_ACL_ACCESS,
826 .flags = XATTR_ACL_ACCESS_T,
827 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
828 .get = ll_xattr_get_common_4_3,
829 .set = ll_xattr_set_common_4_3,
830 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
831 .get = ll_xattr_get_common_3_11,
832 .set = ll_xattr_set_common_3_11,
834 .get = ll_xattr_get_common,
835 .set = ll_xattr_set_common,
839 static const struct xattr_handler ll_acl_default_xattr_handler = {
840 #ifdef HAVE_XATTR_HANDLER_NAME
841 .name = XATTR_NAME_POSIX_ACL_DEFAULT,
843 .prefix = XATTR_NAME_POSIX_ACL_DEFAULT,
845 .flags = XATTR_ACL_DEFAULT_T,
846 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
847 .get = ll_xattr_get_common_4_3,
848 .set = ll_xattr_set_common_4_3,
849 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
850 .get = ll_xattr_get_common_3_11,
851 .set = ll_xattr_set_common_3_11,
853 .get = ll_xattr_get_common,
854 .set = ll_xattr_set_common,
858 static const struct xattr_handler ll_lustre_xattr_handler = {
859 .prefix = XATTR_LUSTRE_PREFIX,
860 .flags = XATTR_LUSTRE_T,
861 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
862 .get = ll_xattr_get_4_3,
863 .set = ll_xattr_set_4_3,
864 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
865 .get = ll_xattr_get_3_11,
866 .set = ll_xattr_set_3_11,
873 const struct xattr_handler *ll_xattr_handlers[] = {
874 &ll_user_xattr_handler,
875 &ll_trusted_xattr_handler,
876 &ll_security_xattr_handler,
877 #ifdef CONFIG_LUSTRE_FS_POSIX_ACL
878 &ll_acl_access_xattr_handler,
879 &ll_acl_default_xattr_handler,
881 &ll_lustre_xattr_handler,