From: Andreas Dilger Date: Thu, 16 Feb 2023 16:21:50 +0000 (-0700) Subject: LU-12275 sec: disable bio functions on client X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=0ebb7e37b85f8e881985bdcb45d3e16ace37c1f0;p=fs%2Flustre-release.git LU-12275 sec: disable bio functions on client Disable llcrypt_zeroout_range() for client builds because it is not needed since direct block device access is not used by llite. Test-Parameters: trivial Fixes: a813e8187 ("LU-12275 sec: add llcrypt as file encryption library") Signed-off-by: Andreas Dilger Change-Id: I97642dfd85053b9ea4196374f2002ffb6a2540e5 --- diff --git a/libcfs/include/libcfs/crypto/llcrypt.h b/libcfs/include/libcfs/crypto/llcrypt.h index b152915..93e1766 100644 --- a/libcfs/include/libcfs/crypto/llcrypt.h +++ b/libcfs/include/libcfs/crypto/llcrypt.h @@ -267,12 +267,14 @@ static inline bool llcrypt_match_name(const struct llcrypt_name *fname, return !memcmp(de_name, fname->disk_name.name, fname->disk_name.len); } +#ifdef HAVE_SERVER_SUPPORT /* bio.c */ extern void llcrypt_decrypt_bio(struct bio *); extern void llcrypt_enqueue_decrypt_bio(struct llcrypt_ctx *ctx, struct bio *bio); extern int llcrypt_zeroout_range(const struct inode *, pgoff_t, sector_t, unsigned int); +#endif /* hooks.c */ extern int llcrypt_file_open(struct inode *inode, struct file *filp); @@ -525,6 +527,7 @@ static inline bool llcrypt_match_name(const struct llcrypt_name *fname, return !memcmp(de_name, fname->disk_name.name, fname->disk_name.len); } +#ifdef HAVE_SERVER_SUPPORT /* bio.c */ static inline void llcrypt_decrypt_bio(struct bio *bio) { @@ -540,6 +543,7 @@ static inline int llcrypt_zeroout_range(const struct inode *inode, pgoff_t lblk, { return -EOPNOTSUPP; } +#endif /* hooks.c */ diff --git a/libcfs/libcfs/crypto/bio.c b/libcfs/libcfs/crypto/bio.c index 78b56cb..02ecacf 100644 --- a/libcfs/libcfs/crypto/bio.c +++ b/libcfs/libcfs/crypto/bio.c @@ -24,6 +24,7 @@ * tags/v5.4 */ +#ifdef HAVE_SERVER_SUPPORT #include #include #include @@ -126,3 +127,4 @@ errout: return err; } EXPORT_SYMBOL(llcrypt_zeroout_range); +#endif