Commit d421acb1 authored by Sage Weil's avatar Sage Weil

ceph: pass ceph.* removexattrs through to MDS

If we do not explicitly recognized a vxattr (e.g., as readonly), pass
the request through to the MDS and deal with it there.
Signed-off-by: default avatarSage Weil <sage@inktank.com>
Reviewed-by: default avatarSam Lang <sam.lang@inktank.com>
parent 3adf654d
...@@ -892,6 +892,10 @@ int ceph_removexattr(struct dentry *dentry, const char *name) ...@@ -892,6 +892,10 @@ int ceph_removexattr(struct dentry *dentry, const char *name)
if (vxattr && vxattr->readonly) if (vxattr && vxattr->readonly)
return -EOPNOTSUPP; return -EOPNOTSUPP;
/* pass any unhandled ceph.* xattrs through to the MDS */
if (!strncmp(name, XATTR_CEPH_PREFIX, XATTR_CEPH_PREFIX_LEN))
goto do_sync_unlocked;
err = -ENOMEM; err = -ENOMEM;
spin_lock(&ci->i_ceph_lock); spin_lock(&ci->i_ceph_lock);
retry: retry:
...@@ -931,6 +935,7 @@ int ceph_removexattr(struct dentry *dentry, const char *name) ...@@ -931,6 +935,7 @@ int ceph_removexattr(struct dentry *dentry, const char *name)
return err; return err;
do_sync: do_sync:
spin_unlock(&ci->i_ceph_lock); spin_unlock(&ci->i_ceph_lock);
do_sync_unlocked:
err = ceph_send_removexattr(dentry, name); err = ceph_send_removexattr(dentry, name);
out: out:
return err; return err;
......
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