Commit 7e1abff7 authored by Nathan Scott's avatar Nathan Scott

[XFS] Transition from xfsroot attribute namespace to the more generic trusted

namespace which other filesystems are also supporting.

SGI Modid: 2.5.x-xfs:slinx:140237a
parent 247df480
...@@ -523,7 +523,7 @@ linvfs_truncate( ...@@ -523,7 +523,7 @@ linvfs_truncate(
*/ */
#define SYSTEM_NAME "system." /* VFS shared names/values */ #define SYSTEM_NAME "system." /* VFS shared names/values */
#define ROOT_NAME "xfsroot." /* XFS ondisk names/values */ #define ROOT_NAME "trusted." /* root's own names/values */
#define USER_NAME "user." /* user's own names/values */ #define USER_NAME "user." /* user's own names/values */
STATIC xattr_namespace_t xfs_namespace_array[] = { STATIC xattr_namespace_t xfs_namespace_array[] = {
{ .name= SYSTEM_NAME, .namelen= sizeof(SYSTEM_NAME)-1,.exists= NULL }, { .name= SYSTEM_NAME, .namelen= sizeof(SYSTEM_NAME)-1,.exists= NULL },
...@@ -590,7 +590,7 @@ linvfs_setxattr( ...@@ -590,7 +590,7 @@ linvfs_setxattr(
error = -EINVAL; error = -EINVAL;
if (flags & XATTR_CREATE) if (flags & XATTR_CREATE)
return error; return error;
error = -ENOATTR; error = -EOPNOTSUPP;
p += xfs_namespaces[SYSTEM_NAMES].namelen; p += xfs_namespaces[SYSTEM_NAMES].namelen;
if (strcmp(p, POSIXACL_ACCESS) == 0) { if (strcmp(p, POSIXACL_ACCESS) == 0) {
error = xfs_acl_vset(vp, (void *) data, size, error = xfs_acl_vset(vp, (void *) data, size,
...@@ -632,7 +632,7 @@ linvfs_setxattr( ...@@ -632,7 +632,7 @@ linvfs_setxattr(
VOP_ATTR_SET(vp, p, (void *) data, size, xflags, NULL, error); VOP_ATTR_SET(vp, p, (void *) data, size, xflags, NULL, error);
return -error; return -error;
} }
return -ENOATTR; return -EOPNOTSUPP;
} }
STATIC ssize_t STATIC ssize_t
...@@ -651,7 +651,7 @@ linvfs_getxattr( ...@@ -651,7 +651,7 @@ linvfs_getxattr(
if (strncmp(name, xfs_namespaces[SYSTEM_NAMES].name, if (strncmp(name, xfs_namespaces[SYSTEM_NAMES].name,
xfs_namespaces[SYSTEM_NAMES].namelen) == 0) { xfs_namespaces[SYSTEM_NAMES].namelen) == 0) {
error = -ENOATTR; error = -EOPNOTSUPP;
p += xfs_namespaces[SYSTEM_NAMES].namelen; p += xfs_namespaces[SYSTEM_NAMES].namelen;
if (strcmp(p, POSIXACL_ACCESS) == 0) { if (strcmp(p, POSIXACL_ACCESS) == 0) {
error = xfs_acl_vget(vp, data, size, _ACL_TYPE_ACCESS); error = xfs_acl_vget(vp, data, size, _ACL_TYPE_ACCESS);
...@@ -690,7 +690,7 @@ linvfs_getxattr( ...@@ -690,7 +690,7 @@ linvfs_getxattr(
error = -size; error = -size;
return -error; return -error;
} }
return -ENOATTR; return -EOPNOTSUPP;
} }
...@@ -754,7 +754,7 @@ linvfs_removexattr( ...@@ -754,7 +754,7 @@ linvfs_removexattr(
if (strncmp(name, xfs_namespaces[SYSTEM_NAMES].name, if (strncmp(name, xfs_namespaces[SYSTEM_NAMES].name,
xfs_namespaces[SYSTEM_NAMES].namelen) == 0) { xfs_namespaces[SYSTEM_NAMES].namelen) == 0) {
error = -ENOATTR; error = -EOPNOTSUPP;
p += xfs_namespaces[SYSTEM_NAMES].namelen; p += xfs_namespaces[SYSTEM_NAMES].namelen;
if (strcmp(p, POSIXACL_ACCESS) == 0) if (strcmp(p, POSIXACL_ACCESS) == 0)
error = xfs_acl_vremove(vp, _ACL_TYPE_ACCESS); error = xfs_acl_vremove(vp, _ACL_TYPE_ACCESS);
...@@ -782,7 +782,7 @@ linvfs_removexattr( ...@@ -782,7 +782,7 @@ linvfs_removexattr(
VOP_ATTR_REMOVE(vp, p, xflags, NULL, error); VOP_ATTR_REMOVE(vp, p, xflags, NULL, error);
return -error; return -error;
} }
return -ENOATTR; return -EOPNOTSUPP;
} }
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
/* /*
* The maximum size (into the kernel or returned from the kernel) of an * The maximum size (into the kernel or returned from the kernel) of an
* attribute value or the buffer used for an attr_list() call. Larger * attribute value or the buffer used for an attr_list() call. Larger
* sizes will result in an E2BIG return code. * sizes will result in an ERANGE return code.
*/ */
#define ATTR_MAX_VALUELEN (64*1024) /* max length of a value */ #define ATTR_MAX_VALUELEN (64*1024) /* max length of a value */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment