Whamcloud - gitweb
EX-7327 utils: add warning for 'lfs setstripe' compression
authorBobi Jam <bobijam@whamcloud.com>
Mon, 17 Apr 2023 08:17:05 +0000 (16:17 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 12 Jun 2023 23:36:16 +0000 (23:36 +0000)
Add warning message to indicate that file compression is a preview
feature, not for production use.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I1d5f9bdb11e33e8dbd65c6048d62e612020af3a3
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/50658
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
lustre/tests/sanity-pfl.sh
lustre/utils/liblustreapi_layout.c

index ef2e9c9..16aff0d 100644 (file)
@@ -2432,6 +2432,7 @@ test_25() {
 }
 run_test 25 "Verify old lov stripe API with PFL files"
 
+export LFS_SETSTRIPE_COMPR_OK="yes"
 test_100a() {
        (( $MDS1_VERSION >= $(version_code 2.14.0.85) )) ||
                skip "Need MDS >= 2.14.0.85 for compression support"
@@ -2631,6 +2632,7 @@ test_100c() {
        }
 }
 run_test 100c "create compress file with improper compress arguments"
+export LFS_SETSTRIPE_COMPR_OK=""
 
 test_100d() {
        (( $MDS1_VERSION >= $(version_code 2.14.0.88) )) ||
index b25f991..1920110 100644 (file)
@@ -1553,6 +1553,11 @@ int llapi_layout_compress_set(struct llapi_layout *layout,
        if (type == LL_COMPR_TYPE_NONE)
                return 0;
 
+       if (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.\n");
+       }
+
        for (i = 0; i < ARRAY_SIZE(compr_type_table); i++) {
                if (compr_type_table[i].ctn_compr_type == type) {
                        if (compr_type_table[i].ctn_from_compr_level != NULL) {