summaryrefslogtreecommitdiffstats
path: root/fs/ceph/strings.c
diff options
context:
space:
mode:
authorMilind Changire <milindchangire@gmail.com>2022-02-14 05:01:01 +0000
committerIlya Dryomov <idryomov@gmail.com>2022-03-01 18:26:37 +0100
commit6ddf5f165f13ab623d04aee2a473d35818255199 (patch)
treed83df283e20d874477675cf500b8ad9338aaa352 /fs/ceph/strings.c
parent27884f4bce63ebb8821992787d3e687cc24d95a3 (diff)
downloadlinux-6ddf5f165f13ab623d04aee2a473d35818255199.tar.gz
linux-6ddf5f165f13ab623d04aee2a473d35818255199.tar.bz2
linux-6ddf5f165f13ab623d04aee2a473d35818255199.zip
ceph: add getvxattr op
Problem: Some directory vxattrs (e.g. ceph.dir.pin.random) are governed by information that isn't necessarily shared with the client. Add support for the new GETVXATTR operation, which allows the client to query the MDS directly for vxattrs. When the client is queried for a vxattr that doesn't have a special handler, have it issue a GETVXATTR to the MDS directly. Solution: Adds new getvxattr op to fetch ceph.dir.pin*, ceph.dir.layout* and ceph.file.layout* vxattrs. If the entire layout for a dir or a file is being set, then it is expected that the layout be set in standard JSON format. Individual field value retrieval is not wrapped in JSON. The JSON format also applies while setting the vxattr if the entire layout is being set in one go. As a temporary measure, setting a vxattr can also be done in the old format. The old format will be deprecated in the future. URL: https://tracker.ceph.com/issues/51062 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/strings.c')
-rw-r--r--fs/ceph/strings.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/strings.c b/fs/ceph/strings.c
index 573bb9556fb5..e36e8948e728 100644
--- a/fs/ceph/strings.c
+++ b/fs/ceph/strings.c
@@ -60,6 +60,7 @@ const char *ceph_mds_op_name(int op)
case CEPH_MDS_OP_LOOKUPINO: return "lookupino";
case CEPH_MDS_OP_LOOKUPNAME: return "lookupname";
case CEPH_MDS_OP_GETATTR: return "getattr";
+ case CEPH_MDS_OP_GETVXATTR: return "getvxattr";
case CEPH_MDS_OP_SETXATTR: return "setxattr";
case CEPH_MDS_OP_SETATTR: return "setattr";
case CEPH_MDS_OP_RMXATTR: return "rmxattr";