Skip to content

Commit

Permalink
ceph: pass ceph.* removexattrs through to MDS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sage Weil committed Feb 14, 2013
1 parent 3adf654 commit d421acb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/ceph/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -931,6 +935,7 @@ int ceph_removexattr(struct dentry *dentry, const char *name)
return err;
do_sync:
spin_unlock(&ci->i_ceph_lock);
do_sync_unlocked:
err = ceph_send_removexattr(dentry, name);
out:
return err;
Expand Down

0 comments on commit d421acb

Please sign in to comment.