From 79ac7c144539e0d964db329c341ebf30a8472f5c Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Wed, 13 Oct 2021 09:35:01 +0000 Subject: [PATCH] LU-13717 sec: missing defs in includes for client encryption Add a few missing definitions in lustre_crypto.h that are required in case Lustre client encryption is built against the in-kernel fscrypt library. Fixes: 028281ae19 ("LU-13717 sec: rework includes for client encryption") Test-Parameters: trivial Signed-off-by: Sebastien Buisson Change-Id: I1965503554dcf660770d201444cfafd54aa84dce Reviewed-on: https://review.whamcloud.com/45221 Tested-by: jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/include/lustre_crypto.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lustre/include/lustre_crypto.h b/lustre/include/lustre_crypto.h index 284b9cc..c100028 100644 --- a/lustre/include/lustre_crypto.h +++ b/lustre/include/lustre_crypto.h @@ -109,6 +109,13 @@ static inline int critical_decode(const u8 *src, int len, char *dst) #define __FS_HAS_ENCRYPTION 1 #include +#define LLCRYPT_FNAME_DIGEST_SIZE FSCRYPT_FNAME_DIGEST_SIZE +#define LLCRYPT_FNAME_DIGEST FSCRYPT_FNAME_DIGEST +#define llcrypt_name fscrypt_name +#define llcrypt_str fscrypt_str +#define LLTR_INIT FSTR_INIT +#define LLCRYPT_FNAME_MAX_UNDIGESTED_SIZE \ + FSCRYPT_FNAME_MAX_UNDIGESTED_SIZE #define llcrypt_operations fscrypt_operations #define llcrypt_symlink_data fscrypt_symlink_data #define llcrypt_dummy_context_enabled(inode) \ @@ -161,6 +168,8 @@ static inline int critical_decode(const u8 *src, int len, char *dst) fscrypt_prepare_lookup(dir, dentry, fname) #define llcrypt_encrypt_symlink(inode, target, len, disk_link) \ fscrypt_encrypt_symlink(inode, target, len, disk_link) +#define __llcrypt_encrypt_symlink(inode, target, len, disk_link) \ + __fscrypt_encrypt_symlink(inode, target, len, disk_link) #define llcrypt_prepare_symlink(dir, target, len, max_len, disk_link) \ fscrypt_prepare_symlink(dir, target, len, max_len, disk_link) #define llcrypt_get_symlink(inode, caddr, max_size, done) \ -- 1.8.3.1