ceph: pass ceph.* removexattrs through to MDS
authorSage Weil <sage@inktank.com>
Mon, 21 Jan 2013 05:55:30 +0000 (21:55 -0800)
committerSage Weil <sage@inktank.com>
Thu, 14 Feb 2013 02:25:55 +0000 (18:25 -0800)
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>
fs/ceph/xattr.c

index edc47de77fed31533d194fa44f0b339c364918f8..234270f00c2a0f9e38ec088db9100c6fe6d5d384 100644 (file)
@@ -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;