diff options
author | Jeff Layton <jlayton@kernel.org> | 2021-01-14 18:39:22 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2023-08-24 12:24:34 +0300 |
commit | 24865e75c1a4e70ac9e8328dae8b5e03712a6e8c (patch) | |
tree | f4ecf5f2a42974d9c8d9bbc456eb9afb2d878525 /fs/ceph/mds_client.h | |
parent | 3fd945a79e147ee10f84213976889b29049c3519 (diff) | |
download | linux-24865e75c1a4e70ac9e8328dae8b5e03712a6e8c.tar.xz |
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>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r-- | fs/ceph/mds_client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index 1105baa97d49..3cf874925519 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h @@ -285,6 +285,9 @@ struct ceph_mds_request { struct ceph_fscrypt_auth *r_fscrypt_auth; + u8 *r_altname; /* fscrypt binary crypttext for long filenames */ + u32 r_altname_len; /* length of r_altname */ + int r_fmode; /* file mode, if expecting cap */ int r_request_release_offset; const struct cred *r_cred; |