From: Sebastien Buisson Date: Tue, 27 Jun 2023 14:42:20 +0000 (+0200) Subject: EX-7775 utils: fix LL_COMPR_TYPE wire checks X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=781bb7d00556bca2ad29fca12167b95699b604b2;p=fs%2Flustre-release.git EX-7775 utils: fix LL_COMPR_TYPE wire checks Fix LL_COMPR_TYPE* wire checks to avoid duplication. The value of LL_COMPR_TYPE_UNCHANGED is also declared as 15 so that is does not conflict with other potential real compression types in the future. Fixes: 67d4601737 ("EX-6249 csdc: set compress component for file") Test-Parameters: trivial Signed-off-by: Sebastien Buisson Change-Id: Iab9830f09f0778e1e1f3b1ea4c9878ce1017de8d Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51473 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- diff --git a/lustre/include/uapi/linux/lustre/lustre_user.h b/lustre/include/uapi/linux/lustre/lustre_user.h index 77057cb..d630e80 100644 --- a/lustre/include/uapi/linux/lustre/lustre_user.h +++ b/lustre/include/uapi/linux/lustre/lustre_user.h @@ -2931,7 +2931,7 @@ enum ll_compr_type { LL_COMPR_TYPE_LZ4HC = 5, LL_COMPR_TYPE_LZO = 6, LL_COMPR_TYPE_MAX, - LL_COMPR_TYPE_UNCHANGED + LL_COMPR_TYPE_UNCHANGED = 15 }; #define COMPR_CHUNK_MIN_BITS 16 diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index b5b8c3f..7e642bc 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -6354,20 +6354,4 @@ void lustre_assert_wire_constants(void) (long long)PORTALS_CFG_TYPE); LASSERTF(LUSTRE_CFG_TYPE == 123, "found %lld\n", (long long)LUSTRE_CFG_TYPE); - LASSERTF(LL_COMPR_TYPE_NONE == 0, "found %lld\n", - (long long)LL_COMPR_TYPE_NONE); - LASSERTF(LL_COMPR_TYPE_FAST == 1, "found %lld\n", - (long long)LL_COMPR_TYPE_FAST); - LASSERTF(LL_COMPR_TYPE_BEST == 2, "found %lld\n", - (long long)LL_COMPR_TYPE_BEST); - LASSERTF(LL_COMPR_TYPE_GZIP == 3, "found %lld\n", - (long long)LL_COMPR_TYPE_GZIP); - LASSERTF(LL_COMPR_TYPE_LZ4FAST == 4, "found %lld\n", - (long long)LL_COMPR_TYPE_LZ4FAST); - LASSERTF(LL_COMPR_TYPE_LZ4HC == 5, "found %lld\n", - (long long)LL_COMPR_TYPE_LZ4HC); - LASSERTF(LL_COMPR_TYPE_LZO == 6, "found %lld\n", - (long long)LL_COMPR_TYPE_LZO); - LASSERTF(LL_COMPR_TYPE_MAX == 7, "found %lld\n", - (long long)LL_COMPR_TYPE_MAX); } diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 30af5c6..4f323b6 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -2998,19 +2998,6 @@ check_lustre_cfg(void) CHECK_VALUE(LUSTRE_CFG_TYPE); } -static void -check_ll_compr_type() -{ - CHECK_VALUE(LL_COMPR_TYPE_NONE); - CHECK_VALUE(LL_COMPR_TYPE_FAST); - CHECK_VALUE(LL_COMPR_TYPE_BEST); - CHECK_VALUE(LL_COMPR_TYPE_GZIP); - CHECK_VALUE(LL_COMPR_TYPE_LZ4); - CHECK_VALUE(LL_COMPR_TYPE_LZ4HC); - CHECK_VALUE(LL_COMPR_TYPE_LZO); - CHECK_VALUE(LL_COMPR_TYPE_MAX); -} - int main(int argc, char **argv) { @@ -3418,8 +3405,6 @@ main(int argc, char **argv) #endif /* !HAVE_NATIVE_LINUX_CLIENT */ check_lustre_cfg(); - check_ll_compr_type(); - printf("}\n"); return 0; diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index d0b9154..dff601c 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -6389,20 +6389,4 @@ void lustre_assert_wire_constants(void) (long long)PORTALS_CFG_TYPE); LASSERTF(LUSTRE_CFG_TYPE == 123, "found %lld\n", (long long)LUSTRE_CFG_TYPE); - LASSERTF(LL_COMPR_TYPE_NONE == 0, "found %lld\n", - (long long)LL_COMPR_TYPE_NONE); - LASSERTF(LL_COMPR_TYPE_FAST == 1, "found %lld\n", - (long long)LL_COMPR_TYPE_FAST); - LASSERTF(LL_COMPR_TYPE_BEST == 2, "found %lld\n", - (long long)LL_COMPR_TYPE_BEST); - LASSERTF(LL_COMPR_TYPE_GZIP == 3, "found %lld\n", - (long long)LL_COMPR_TYPE_GZIP); - LASSERTF(LL_COMPR_TYPE_LZ4FAST == 4, "found %lld\n", - (long long)LL_COMPR_TYPE_LZ4FAST); - LASSERTF(LL_COMPR_TYPE_LZ4HC == 5, "found %lld\n", - (long long)LL_COMPR_TYPE_LZ4HC); - LASSERTF(LL_COMPR_TYPE_LZO == 6, "found %lld\n", - (long long)LL_COMPR_TYPE_LZO); - LASSERTF(LL_COMPR_TYPE_MAX == 7, "found %lld\n", - (long long)LL_COMPR_TYPE_MAX); }