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 const struct xattr_handler *get_xattr_type(const char *name)
61 for (i = 0; ll_xattr_handlers[i]; i++) {
62 const char *prefix = xattr_prefix(ll_xattr_handlers[i]);
63 size_t prefix_len = strlen(prefix);
65 if (!strncmp(prefix, name, prefix_len))
66 return ll_xattr_handlers[i];
72 static int xattr_type_filter(struct ll_sb_info *sbi,
73 const struct xattr_handler *handler)
75 /* No handler means XATTR_OTHER_T */
79 if ((handler->flags == XATTR_ACL_ACCESS_T ||
80 handler->flags == XATTR_ACL_DEFAULT_T) &&
81 !(sbi->ll_flags & LL_SBI_ACL))
84 if (handler->flags == XATTR_USER_T &&
85 !(sbi->ll_flags & LL_SBI_USER_XATTR))
88 if (handler->flags == XATTR_TRUSTED_T &&
89 !capable(CAP_SYS_ADMIN))
95 static int ll_xattr_set_common(const struct xattr_handler *handler,
96 struct dentry *dentry, struct inode *inode,
97 const char *name, const void *value, size_t size,
100 struct ll_sb_info *sbi = ll_i2sbi(inode);
101 struct ptlrpc_request *req = NULL;
102 const char *pv = value;
104 ktime_t kstart = ktime_get();
109 /* When setxattr() is called with a size of 0 the value is
110 * unconditionally replaced by "". When removexattr() is
111 * called we get a NULL value and XATTR_REPLACE for flags. */
112 if (!value && flags == XATTR_REPLACE)
113 valid = OBD_MD_FLXATTRRM;
115 valid = OBD_MD_FLXATTR;
117 /* FIXME: enable IMA when the conditions are ready */
118 if (handler->flags == XATTR_SECURITY_T &&
119 (!strcmp(name, "ima") || !strcmp(name, "evm")))
122 rc = xattr_type_filter(sbi, handler);
126 if ((handler->flags == XATTR_ACL_ACCESS_T ||
127 handler->flags == XATTR_ACL_DEFAULT_T) &&
128 !inode_owner_or_capable(inode))
131 /* b10667: ignore lustre special xattr for now */
132 if (!strcmp(name, "hsm") ||
133 ((handler->flags == XATTR_TRUSTED_T && !strcmp(name, "lov")) ||
134 (handler->flags == XATTR_LUSTRE_T && !strcmp(name, "lov"))))
137 /* LU-549: Disable security.selinux when selinux is disabled */
138 if (handler->flags == XATTR_SECURITY_T && !selinux_is_enabled() &&
139 strcmp(name, "selinux") == 0)
143 * In user.* namespace, only regular files and directories can have
144 * extended attributes.
146 if (handler->flags == XATTR_USER_T) {
147 if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode))
151 /* Setting LL_XATTR_NAME_ENCRYPTION_CONTEXT xattr is only allowed
152 * when defining an encryption policy on a directory, ie when it
153 * comes from ll_set_context().
154 * When new files/dirs are created in an encrypted dir, the xattr
155 * is set directly in the create request.
157 if (handler->flags == XATTR_SECURITY_T &&
158 !strcmp(name, "c") &&
159 !ll_file_test_and_clear_flag(ll_i2info(inode), LLIF_SET_ENC_CTX))
162 fullname = kasprintf(GFP_KERNEL, "%s%s", xattr_prefix(handler), name);
166 rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), valid, fullname,
167 pv, size, flags, ll_i2suppgid(inode), &req);
170 if (rc == -EOPNOTSUPP && handler->flags == XATTR_USER_T) {
171 LCONSOLE_INFO("Disabling user_xattr feature because it is not supported on the server\n");
172 sbi->ll_flags &= ~LL_SBI_USER_XATTR;
177 ptlrpc_req_finished(req);
179 ll_stats_ops_tally(ll_i2sbi(inode), valid == OBD_MD_FLXATTRRM ?
180 LPROC_LL_REMOVEXATTR : LPROC_LL_SETXATTR,
181 ktime_us_delta(ktime_get(), kstart));
186 static int get_hsm_state(struct inode *inode, u32 *hus_states)
188 struct md_op_data *op_data;
189 struct hsm_user_state *hus;
196 op_data = ll_prep_md_op_data(NULL, inode, NULL, NULL, 0, 0,
197 LUSTRE_OPC_ANY, hus);
198 if (!IS_ERR(op_data)) {
199 rc = obd_iocontrol(LL_IOC_HSM_STATE_GET, ll_i2mdexp(inode),
200 sizeof(*op_data), op_data, NULL);
202 *hus_states = hus->hus_states;
204 CDEBUG(D_VFSTRACE, "obd_iocontrol failed. rc = %d\n",
207 ll_finish_md_op_data(op_data);
209 rc = PTR_ERR(op_data);
210 CDEBUG(D_VFSTRACE, "Could not prepare the opdata. rc = %d\n",
217 static int ll_adjust_lum(struct inode *inode, struct lov_user_md *lump, size_t size)
219 struct lov_comp_md_v1 *comp_v1 = (struct lov_comp_md_v1 *)lump;
220 struct lov_user_md *v1 = lump;
221 bool need_clear_release = false;
222 bool release_checked = false;
223 bool is_composite = false;
231 if (lump->lmm_magic == LOV_USER_MAGIC_COMP_V1) {
232 if (size < sizeof(*comp_v1))
235 entry_count = comp_v1->lcm_entry_count;
236 if (size < offsetof(typeof(*comp_v1), lcm_entries[entry_count]))
241 for (i = 0; i < entry_count; i++) {
242 if (lump->lmm_magic == LOV_USER_MAGIC_COMP_V1) {
245 if (comp_v1->lcm_entries[i].lcme_offset + sizeof(*v1) >
249 ptr += comp_v1->lcm_entries[i].lcme_offset;
250 v1 = (struct lov_user_md *)ptr;
254 * Attributes that are saved via getxattr will always
255 * have the stripe_offset as 0. Instead, the MDS
256 * should be allowed to pick the starting OST index.
259 if (!is_composite && v1->lmm_stripe_offset == 0)
260 v1->lmm_stripe_offset = -1;
262 /* Avoid anyone directly setting the RELEASED flag. */
263 if (v1->lmm_pattern & LOV_PATTERN_F_RELEASED) {
264 if (!release_checked) {
267 rc = get_hsm_state(inode, &state);
271 if (!(state & HS_ARCHIVED))
272 need_clear_release = true;
273 release_checked = true;
275 if (need_clear_release)
276 v1->lmm_pattern ^= LOV_PATTERN_F_RELEASED;
283 static int ll_setstripe_ea(struct dentry *dentry, struct lov_user_md *lump,
286 struct inode *inode = dentry->d_inode;
290 * It is possible to set an xattr to a "" value of zero size.
291 * For this case we are going to treat it as a removal.
296 if (size && size < sizeof(*lump)) {
297 /* ll_adjust_lum() or ll_lov_user_md_size() might access
298 * before size - just give up now.
302 rc = ll_adjust_lum(inode, lump, size);
306 if (lump && S_ISREG(inode->i_mode)) {
307 u64 it_flags = FMODE_WRITE;
310 lum_size = ll_lov_user_md_size(lump);
311 if (lum_size < 0 || size < lum_size)
314 rc = ll_lov_setstripe_ea_info(inode, dentry, it_flags, lump,
317 * b=10667: ignore -EEXIST.
318 * Silently eat error on setting trusted.lov/lustre.lov
319 * attribute for platforms that added the default option
320 * to copy all attributes in 'cp' command. Both rsync and
321 * tar --xattrs also will try to set LOVEA for existing
326 } else if (S_ISDIR(inode->i_mode)) {
327 if (size != 0 && size < sizeof(struct lov_user_md))
330 rc = ll_dir_setstripe(inode, lump, 0);
336 static int ll_xattr_set(const struct xattr_handler *handler,
337 struct dentry *dentry, struct inode *inode,
338 const char *name, const void *value, size_t size,
341 ktime_t kstart = ktime_get();
342 int op_type = flags == XATTR_REPLACE ? LPROC_LL_REMOVEXATTR :
349 CDEBUG(D_VFSTRACE, "VFS Op:inode=" DFID "(%p), xattr %s\n",
350 PFID(ll_inode2fid(inode)), inode, name);
352 /* lustre/trusted.lov.xxx would be passed through xattr API */
353 if (!strcmp(name, "lov")) {
354 rc = ll_setstripe_ea(dentry, (struct lov_user_md *)value,
356 ll_stats_ops_tally(ll_i2sbi(inode), op_type,
357 ktime_us_delta(ktime_get(), kstart));
359 } else if (!strcmp(name, "lma") || !strcmp(name, "link")) {
360 ll_stats_ops_tally(ll_i2sbi(inode), op_type,
361 ktime_us_delta(ktime_get(), kstart));
365 if (strncmp(name, "lov.", 4) == 0 &&
366 (__swab32(((struct lov_user_md *)value)->lmm_magic) &
367 le32_to_cpu(LOV_MAGIC_MASK)) == le32_to_cpu(LOV_MAGIC_MAGIC))
368 lustre_swab_lov_user_md((struct lov_user_md *)value, 0);
370 return ll_xattr_set_common(handler, dentry, inode, name, value, size,
374 int ll_xattr_list(struct inode *inode, const char *name, int type, void *buffer,
375 size_t size, u64 valid)
377 struct ll_inode_info *lli = ll_i2info(inode);
378 struct ll_sb_info *sbi = ll_i2sbi(inode);
379 struct ptlrpc_request *req = NULL;
384 if (sbi->ll_xattr_cache_enabled && type != XATTR_ACL_ACCESS_T &&
385 (type != XATTR_SECURITY_T || strcmp(name, "security.selinux"))) {
386 rc = ll_xattr_cache_get(inode, name, buffer, size, valid);
388 goto getxattr_nocache;
392 /* Add "system.posix_acl_access" to the list */
393 if (lli->lli_posix_acl && valid & OBD_MD_FLXATTRLS) {
395 rc += sizeof(XATTR_NAME_ACL_ACCESS);
396 } else if (size - rc >= sizeof(XATTR_NAME_ACL_ACCESS)) {
397 memcpy(buffer + rc, XATTR_NAME_ACL_ACCESS,
398 sizeof(XATTR_NAME_ACL_ACCESS));
399 rc += sizeof(XATTR_NAME_ACL_ACCESS);
401 GOTO(out_xattr, rc = -ERANGE);
406 rc = md_getxattr(sbi->ll_md_exp, ll_inode2fid(inode), valid,
411 /* only detect the xattr size */
416 GOTO(out, rc = -ERANGE);
418 /* do not need swab xattr data */
419 xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA,
422 GOTO(out, rc = -EPROTO);
424 memcpy(buffer, xdata, rc);
430 if (rc == -EOPNOTSUPP && type == XATTR_USER_T) {
431 LCONSOLE_INFO("%s: disabling user_xattr feature because "
432 "it is not supported on the server: rc = %d\n",
434 sbi->ll_flags &= ~LL_SBI_USER_XATTR;
437 ptlrpc_req_finished(req);
441 static int ll_xattr_get_common(const struct xattr_handler *handler,
442 struct dentry *dentry,
444 const char *name, void *buffer, size_t size)
446 struct ll_sb_info *sbi = ll_i2sbi(inode);
447 ktime_t kstart = ktime_get();
453 rc = xattr_type_filter(sbi, handler);
457 /* LU-549: Disable security.selinux when selinux is disabled */
458 if (handler->flags == XATTR_SECURITY_T && !selinux_is_enabled() &&
459 !strcmp(name, "selinux"))
462 #ifdef CONFIG_LUSTRE_FS_POSIX_ACL
463 /* posix acl is under protection of LOOKUP lock. when calling to this,
464 * we just have path resolution to the target inode, so we have great
465 * chance that cached ACL is uptodate.
467 if (handler->flags == XATTR_ACL_ACCESS_T) {
468 struct ll_inode_info *lli = ll_i2info(inode);
469 struct posix_acl *acl;
471 spin_lock(&lli->lli_lock);
472 acl = posix_acl_dup(lli->lli_posix_acl);
473 spin_unlock(&lli->lli_lock);
478 rc = posix_acl_to_xattr(&init_user_ns, acl, buffer, size);
479 posix_acl_release(acl);
482 if (handler->flags == XATTR_ACL_DEFAULT_T && !S_ISDIR(inode->i_mode))
486 fullname = kasprintf(GFP_KERNEL, "%s%s", xattr_prefix(handler), name);
490 rc = ll_xattr_list(inode, fullname, handler->flags, buffer, size,
493 ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETXATTR,
494 ktime_us_delta(ktime_get(), kstart));
499 static ssize_t ll_getxattr_lov(struct inode *inode, void *buf, size_t buf_size)
503 if (S_ISREG(inode->i_mode)) {
504 struct cl_object *obj = ll_i2info(inode)->lli_clob;
505 struct cl_layout cl = {
506 .cl_buf.lb_buf = buf,
507 .cl_buf.lb_len = buf_size,
515 env = cl_env_get(&refcheck);
517 RETURN(PTR_ERR(env));
519 rc = cl_object_layout_get(env, obj, &cl);
524 GOTO(out_env, rc = -ENODATA);
531 LASSERT(buf && rc <= buf_size);
534 * Do not return layout gen for getxattr() since
535 * otherwise it would confuse tar --xattr by
536 * recognizing layout gen as stripe offset when the
537 * file is restored. See LU-2809.
539 if ((((struct lov_mds_md *)buf)->lmm_magic &
540 __swab32(LOV_MAGIC_MAGIC)) == __swab32(LOV_MAGIC_MAGIC))
541 lustre_swab_lov_user_md((struct lov_user_md *)buf,
544 switch (((struct lov_mds_md *)buf)->lmm_magic) {
547 case LOV_MAGIC_SPECIFIC:
548 ((struct lov_mds_md *)buf)->lmm_layout_gen = 0;
550 case LOV_MAGIC_COMP_V1:
551 case LOV_MAGIC_FOREIGN:
554 CERROR("Invalid LOV magic %08x\n",
555 ((struct lov_mds_md *)buf)->lmm_magic);
556 GOTO(out_env, rc = -EINVAL);
560 cl_env_put(env, &refcheck);
563 } else if (S_ISDIR(inode->i_mode)) {
564 struct ptlrpc_request *req = NULL;
565 struct ptlrpc_request *root_req = NULL;
566 struct lov_mds_md *lmm = NULL;
569 rc = ll_dir_getstripe_default(inode, (void **)&lmm, &lmm_size,
575 GOTO(out_req, rc = lmm_size);
577 if (buf_size < lmm_size)
578 GOTO(out_req, rc = -ERANGE);
580 memcpy(buf, lmm, lmm_size);
581 GOTO(out_req, rc = lmm_size);
584 ptlrpc_req_finished(req);
586 ptlrpc_req_finished(root_req);
594 static int ll_xattr_get(const struct xattr_handler *handler,
595 struct dentry *dentry, struct inode *inode,
596 const char *name, void *buffer, size_t size)
601 CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), xattr %s\n",
602 PFID(ll_inode2fid(inode)), inode, name);
604 if (!strcmp(name, "lov")) {
605 ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETXATTR, 1);
607 return ll_getxattr_lov(inode, buffer, size);
610 return ll_xattr_get_common(handler, dentry, inode, name, buffer, size);
613 ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
615 struct inode *inode = dentry->d_inode;
616 struct ll_sb_info *sbi = ll_i2sbi(inode);
617 ktime_t kstart = ktime_get();
624 CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
625 PFID(ll_inode2fid(inode)), inode);
627 rc = ll_xattr_list(inode, NULL, XATTR_OTHER_T, buffer, size,
633 * If we're being called to get the size of the xattr list
634 * (size == 0) then just assume that a lustre.lov xattr
644 len = strnlen(xattr_name, rem - 1) + 1;
646 if (!xattr_type_filter(sbi, get_xattr_type(xattr_name))) {
647 /* Skip OK xattr type, leave it in buffer. */
653 * Move up remaining xattrs in buffer
654 * removing the xattr that is not OK.
656 memmove(xattr_name, xattr_name + len, rem);
660 rc2 = ll_getxattr_lov(inode, NULL, 0);
667 if (size < rc + sizeof(XATTR_LUSTRE_LOV))
670 memcpy(buffer + rc, XATTR_LUSTRE_LOV, sizeof(XATTR_LUSTRE_LOV));
673 ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LISTXATTR,
674 ktime_us_delta(ktime_get(), kstart));
676 RETURN(rc + sizeof(XATTR_LUSTRE_LOV));
679 #ifdef HAVE_XATTR_HANDLER_SIMPLIFIED
680 static int ll_xattr_get_common_4_3(const struct xattr_handler *handler,
681 struct dentry *dentry, const char *name,
682 void *buffer, size_t size)
684 return ll_xattr_get_common(handler, dentry, dentry->d_inode, name,
688 static int ll_xattr_get_4_3(const struct xattr_handler *handler,
689 struct dentry *dentry, const char *name,
690 void *buffer, size_t size)
692 return ll_xattr_get(handler, dentry, dentry->d_inode, name, buffer,
696 static int ll_xattr_set_common_4_3(const struct xattr_handler *handler,
697 struct dentry *dentry, const char *name,
698 const void *value, size_t size, int flags)
700 return ll_xattr_set_common(handler, dentry, dentry->d_inode, name,
704 static int ll_xattr_set_4_3(const struct xattr_handler *handler,
705 struct dentry *dentry, const char *name,
706 const void *value, size_t size, int flags)
708 return ll_xattr_set(handler, dentry, dentry->d_inode, name, value,
712 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
713 const struct xattr_handler *get_xattr_handler(int handler_flag)
717 while (ll_xattr_handlers[i]) {
718 if (ll_xattr_handlers[i]->flags == handler_flag)
719 return ll_xattr_handlers[i];
725 static int ll_xattr_get_common_3_11(struct dentry *dentry, const char *name,
726 void *buffer, size_t size, int handler_flags)
728 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
733 return ll_xattr_get_common(handler, dentry, dentry->d_inode, name,
737 static int ll_xattr_get_3_11(struct dentry *dentry, const char *name,
738 void *buffer, size_t size, int handler_flags)
740 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
745 return ll_xattr_get(handler, dentry, dentry->d_inode, name, buffer,
749 static int ll_xattr_set_common_3_11(struct dentry *dentry, const char *name,
750 const void *value, size_t size, int flags,
753 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
758 return ll_xattr_set_common(handler, dentry, dentry->d_inode, name,
762 static int ll_xattr_set_3_11(struct dentry *dentry, const char *name,
763 const void *value, size_t size, int flags,
766 const struct xattr_handler *handler = get_xattr_handler(handler_flags);
771 return ll_xattr_set(handler, dentry, dentry->d_inode, name, value,
776 static const struct xattr_handler ll_user_xattr_handler = {
777 .prefix = XATTR_USER_PREFIX,
778 .flags = XATTR_USER_T,
779 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
780 .get = ll_xattr_get_common_4_3,
781 .set = ll_xattr_set_common_4_3,
782 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
783 .get = ll_xattr_get_common_3_11,
784 .set = ll_xattr_set_common_3_11,
786 .get = ll_xattr_get_common,
787 .set = ll_xattr_set_common,
791 static const struct xattr_handler ll_trusted_xattr_handler = {
792 .prefix = XATTR_TRUSTED_PREFIX,
793 .flags = XATTR_TRUSTED_T,
794 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
795 .get = ll_xattr_get_4_3,
796 .set = ll_xattr_set_4_3,
797 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
798 .get = ll_xattr_get_3_11,
799 .set = ll_xattr_set_3_11,
806 static const struct xattr_handler ll_security_xattr_handler = {
807 .prefix = XATTR_SECURITY_PREFIX,
808 .flags = XATTR_SECURITY_T,
809 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
810 .get = ll_xattr_get_common_4_3,
811 .set = ll_xattr_set_common_4_3,
812 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
813 .get = ll_xattr_get_common_3_11,
814 .set = ll_xattr_set_common_3_11,
816 .get = ll_xattr_get_common,
817 .set = ll_xattr_set_common,
821 static const struct xattr_handler ll_acl_access_xattr_handler = {
822 #ifdef HAVE_XATTR_HANDLER_NAME
823 .name = XATTR_NAME_POSIX_ACL_ACCESS,
825 .prefix = XATTR_NAME_POSIX_ACL_ACCESS,
827 .flags = XATTR_ACL_ACCESS_T,
828 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
829 .get = ll_xattr_get_common_4_3,
830 .set = ll_xattr_set_common_4_3,
831 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
832 .get = ll_xattr_get_common_3_11,
833 .set = ll_xattr_set_common_3_11,
835 .get = ll_xattr_get_common,
836 .set = ll_xattr_set_common,
840 static const struct xattr_handler ll_acl_default_xattr_handler = {
841 #ifdef HAVE_XATTR_HANDLER_NAME
842 .name = XATTR_NAME_POSIX_ACL_DEFAULT,
844 .prefix = XATTR_NAME_POSIX_ACL_DEFAULT,
846 .flags = XATTR_ACL_DEFAULT_T,
847 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
848 .get = ll_xattr_get_common_4_3,
849 .set = ll_xattr_set_common_4_3,
850 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
851 .get = ll_xattr_get_common_3_11,
852 .set = ll_xattr_set_common_3_11,
854 .get = ll_xattr_get_common,
855 .set = ll_xattr_set_common,
859 static const struct xattr_handler ll_lustre_xattr_handler = {
860 .prefix = XATTR_LUSTRE_PREFIX,
861 .flags = XATTR_LUSTRE_T,
862 #if defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
863 .get = ll_xattr_get_4_3,
864 .set = ll_xattr_set_4_3,
865 #elif !defined(HAVE_XATTR_HANDLER_INODE_PARAM)
866 .get = ll_xattr_get_3_11,
867 .set = ll_xattr_set_3_11,
874 const struct xattr_handler *ll_xattr_handlers[] = {
875 &ll_user_xattr_handler,
876 &ll_trusted_xattr_handler,
877 &ll_security_xattr_handler,
878 #ifdef CONFIG_LUSTRE_FS_POSIX_ACL
879 &ll_acl_access_xattr_handler,
880 &ll_acl_default_xattr_handler,
882 &ll_lustre_xattr_handler,