#include <sys/sa_impl.h>
#include <sys/txg.h>
+#include <linux/posix_acl_xattr.h>
/*
* Copy an extended attribute into the buffer provided, or compute the
LASSERT(osd_invariant(obj));
LASSERT(dt_object_exists(dt));
+ if (!osd_obj2dev(obj)->od_posix_acl &&
+ (strcmp(name, POSIX_ACL_XATTR_ACCESS) == 0 ||
+ strcmp(name, POSIX_ACL_XATTR_DEFAULT) == 0))
+ RETURN(-EOPNOTSUPP);
+
down(&obj->oo_guard);
rc = __osd_xattr_get(env, obj, buf, name, &size);
up(&obj->oo_guard);
LASSERT(dt_object_exists(dt));
LASSERT(obj->oo_db);
+ if (!osd_obj2dev(obj)->od_posix_acl &&
+ (strcmp(name, POSIX_ACL_XATTR_ACCESS) == 0 ||
+ strcmp(name, POSIX_ACL_XATTR_DEFAULT) == 0))
+ RETURN(-EOPNOTSUPP);
+
oh = container_of0(handle, struct osd_thandle, ot_super);
down(&obj->oo_guard);
oh = container_of0(handle, struct osd_thandle, ot_super);
LASSERT(oh->ot_tx != NULL);
+ if (!osd_obj2dev(obj)->od_posix_acl &&
+ (strcmp(name, POSIX_ACL_XATTR_ACCESS) == 0 ||
+ strcmp(name, POSIX_ACL_XATTR_DEFAULT) == 0))
+ RETURN(-EOPNOTSUPP);
+
down(&obj->oo_guard);
rc = __osd_xattr_del(env, obj, name, oh);
up(&obj->oo_guard);
LASSERT(obj->oo_sa_xattr);
while ((nvp = nvlist_next_nvpair(obj->oo_sa_xattr, nvp)) != NULL) {
+ const char *name = nvpair_name(nvp);
+
+ if (!osd_obj2dev(obj)->od_posix_acl &&
+ (strcmp(name, POSIX_ACL_XATTR_ACCESS) == 0 ||
+ strcmp(name, POSIX_ACL_XATTR_DEFAULT) == 0))
+ continue;
+
len = strlen(nvpair_name(nvp));
if (lb->lb_buf != NULL) {
if (len + 1 > remain)
return -ERANGE;
- memcpy(lb->lb_buf, nvpair_name(nvp), len);
+ memcpy(lb->lb_buf, name, len);
lb->lb_buf += len;
*((char *)lb->lb_buf) = '\0';
lb->lb_buf++;
while ((rc = -udmu_zap_cursor_retrieve_key(env, zc, oti->oti_key,
MAXNAMELEN)) == 0) {
+ if (!osd_obj2dev(obj)->od_posix_acl &&
+ (strcmp(oti->oti_key, POSIX_ACL_XATTR_ACCESS) == 0 ||
+ strcmp(oti->oti_key, POSIX_ACL_XATTR_DEFAULT) == 0)) {
+ zap_cursor_advance(zc);
+ continue;
+ }
+
rc = strlen(oti->oti_key);
if (lb->lb_buf != NULL) {
if (rc + 1 > remain)