• Milind Changire's avatar
    ceph: add getvxattr op · 6ddf5f16
    Milind Changire authored
    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/51062Signed-off-by: default avatarMilind Changire <mchangir@redhat.com>
    Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
    Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
    6ddf5f16
xattr.c 35.6 KB