ceph: send alternate_name in MClientRequest
authorJeff Layton <jlayton@kernel.org>
Thu, 14 Jan 2021 15:39:22 +0000 (10:39 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 24 Aug 2023 09:24:34 +0000 (11:24 +0200)
commit24865e75c1a4e70ac9e8328dae8b5e03712a6e8c
treef4ecf5f2a42974d9c8d9bbc456eb9afb2d878525
parent3fd945a79e147ee10f84213976889b29049c3519
ceph: send alternate_name in MClientRequest

In the event that we have a filename longer than CEPH_NOHASH_NAME_MAX,
we'll need to hash the tail of the filename. The client however will
still need to know the full name of the file if it has a key.

To support this, the MClientRequest field has grown a new alternate_name
field that we populate with the full (binary) crypttext of the filename.
This is then transmitted to the clients in readdir or traces as part of
the dentry lease.

Add support for populating this field when the filenames are very long.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-and-tested-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c
fs/ceph/mds_client.h