Whamcloud - gitweb
EX-9074 csdc: Provide finer grained enable_compression control
authorArtem Blagodarenko <ablagodarenko@ddn.com>
Fri, 16 Feb 2024 16:50:08 +0000 (16:50 +0000)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 24 Feb 2024 03:46:01 +0000 (03:46 +0000)
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 <ablagodarenko@ddn.com>
Test-Parameters: trivial
Change-Id: Ic8edc5bbeb8f9a3cd34ad3fc4e8c78e59f4cc34f
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53894
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
Reviewed-by: Patrick Farrell <paf0187@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/ptlrpc/pack_generic.c
lustre/utils/liblustreapi_layout.c

index 178a3c8..c6b41b1 100644 (file)
 
 #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)
index 3c24a6f..c770e8a 100644 (file)
@@ -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)