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 <sbuisson@ddn.com>
Change-Id: Iab9830f09f0778e1e1f3b1ea4c9878ce1017de8d
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51473
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
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
(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);
}
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)
{
#endif /* !HAVE_NATIVE_LINUX_CLIENT */
check_lustre_cfg();
- check_ll_compr_type();
-
printf("}\n");
return 0;
(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);
}