]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: add encrypted fname handling to ceph_mdsc_build_path
authorJeff Layton <jlayton@kernel.org>
Fri, 7 Aug 2020 13:28:31 +0000 (09:28 -0400)
committerJeff Layton <jlayton@kernel.org>
Tue, 31 May 2022 15:49:59 +0000 (11:49 -0400)
commita9a4d1b9641fd975581a5cfe9f3726689bcfe0a2
tree5c136191728e89ae720d5a0274dd277c166e2016
parent64bcea947b2ca92c02fdc950b527c094c94c6656
ceph: add encrypted fname handling to ceph_mdsc_build_path

Allow ceph_mdsc_build_path to encrypt and base64 encode the filename
when the parent is encrypted and we're sending the path to the MDS.

In most cases, we just encrypt the filenames and base64 encode them,
but when the name is longer than CEPH_NOHASH_NAME_MAX, we use a similar
scheme to fscrypt proper, and hash the remaning bits with sha256.

When doing this, we then send along the full crypttext of the name in
the new alternate_name field of the MClientRequest. The MDS can then
send that along in readdir responses and traces.

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/ceph/crypto.c
fs/ceph/crypto.h
fs/ceph/mds_client.c