From 39101190ca34ec51c64a3f380dafabec87a9aa7f Mon Sep 17 00:00:00 2001 From: Artem Blagodarenko Date: Fri, 16 Feb 2024 16:50:08 +0000 Subject: [PATCH] EX-9074 csdc: Provide finer grained enable_compression control On all architectures other than aarch64 and ppc64le enable_compression is now enabled by default. lfs warning message is gone. To use CSDC on aarch64/ppc64le (on your own risk) llite.*.enable_compression=1 should be set. lfs set_stripe command still prints a warning message in this case. Signed-off-by: Artem Blagodarenko Test-Parameters: trivial Change-Id: Ic8edc5bbeb8f9a3cd34ad3fc4e8c78e59f4cc34f Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53894 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Colin Faber Reviewed-by: Patrick Farrell Reviewed-by: Andreas Dilger --- lustre/ptlrpc/pack_generic.c | 9 +++++++++ lustre/utils/liblustreapi_layout.c | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 178a3c8..c6b41b1 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -54,7 +54,16 @@ #include "ptlrpc_internal.h" +/* + * Client side data compression is disabled by default + * for aarch64/ppc64le architectures with 64k page size + */ +#if (PAGE_SIZE > 4096) int llite_enable_compression; +#else +int llite_enable_compression = 1; +#endif + EXPORT_SYMBOL(llite_enable_compression); static inline __u32 lustre_msg_hdr_size_v2(__u32 count) diff --git a/lustre/utils/liblustreapi_layout.c b/lustre/utils/liblustreapi_layout.c index 3c24a6f..c770e8a 100644 --- a/lustre/utils/liblustreapi_layout.c +++ b/lustre/utils/liblustreapi_layout.c @@ -1598,7 +1598,9 @@ int llapi_layout_compress_set(struct llapi_layout *layout, enum ll_compr_type type, int level, __u32 chunk_size, unsigned long long stripe_size) { +#if (PAGE_SIZE > 4096) static bool printed; +#endif struct llapi_layout_comp *comp; bool compr_level_set = false; int log_bits; @@ -1613,11 +1615,13 @@ int llapi_layout_compress_set(struct llapi_layout *layout, if (type == LL_COMPR_TYPE_NONE) return 0; +#if (PAGE_SIZE > 4096) if (!printed && getenv("LFS_SETSTRIPE_COMPR_OK") == NULL) { fprintf(stderr, "WARNING: File compression is a technology preview feature and is not yet intended for production use. Compression is skipped for encrypted files. Set LFS_SETSTRIPE_COMPR_OK=y to acknowledge limitations.\n"); printed = true; } +#endif for (i = LL_COMPR_TYPE_NONE; i < LL_COMPR_TYPE_MAX; i++) { if (compr_type_table[i].ctn_name == NULL) -- 1.8.3.1