summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-01-20 21:55:30 -0800
committerSage Weil <sage@inktank.com>2013-02-13 18:25:55 -0800
commitd421acb1ad7dfa31b7463b67f1593714b0b727c3 (patch)
treef35d7a19bbd533269bc273be20b0fbfcb26b64e0
parent3adf654ddbc355c23d75c6684128d4b067a7b792 (diff)
downloadop-kernel-dev-d421acb1ad7dfa31b7463b67f1593714b0b727c3.zip
op-kernel-dev-d421acb1ad7dfa31b7463b67f1593714b0b727c3.tar.gz
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: Sage Weil <sage@inktank.com> Reviewed-by: Sam Lang <sam.lang@inktank.com>
-rw-r--r--fs/ceph/xattr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index edc47de..234270f 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -892,6 +892,10 @@ int ceph_removexattr(struct dentry *dentry, const char *name)
if (vxattr && vxattr->readonly)
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;
spin_lock(&ci->i_ceph_lock);
retry:
@@ -931,6 +935,7 @@ retry:
return err;
do_sync:
spin_unlock(&ci->i_ceph_lock);
+do_sync_unlocked:
err = ceph_send_removexattr(dentry, name);
out:
return err;
OpenPOWER on IntegriCloud