Merge pull request #2086 from bimbashrestha/quick3

[bug] passing cParams.hashLog instead of comprParams->hashLog for ldm trigger
This commit is contained in:
Bimba Shrestha
2020-04-23 13:02:57 -05:00
committed by GitHub
2 changed files with 15 additions and 8 deletions
+1 -1
View File
@@ -807,7 +807,7 @@ static void FIO_adjustParamsForPatchFromMode(FIO_prefs_t* const prefs,
if (fileWindowLog > ZSTD_WINDOWLOG_MAX)
DISPLAYLEVEL(1, "Max window log exceeded by file (compression ratio will suffer)\n");
comprParams->windowLog = MIN(ZSTD_WINDOWLOG_MAX, fileWindowLog);
if (fileWindowLog > ZSTD_cycleLog(comprParams->hashLog, cParams.strategy)) {
if (fileWindowLog > ZSTD_cycleLog(cParams.hashLog, cParams.strategy)) {
if (!prefs->ldmFlag)
DISPLAYLEVEL(1, "long mode automaticaly triggered\n");
FIO_setLdmFlag(prefs, 1);
+7
View File
@@ -1276,6 +1276,13 @@ datagen > tmp_dict
zstd --patch-from=tmp_dict -r tmp_dir && die
rm -rf tmp*
println "\n===> patch-from long mode trigger larger file test"
datagen -g5000000 > tmp_dict
datagen -g5000000 > tmp_patch
zstd -15 --patch-from=tmp_dict tmp_patch 2>&1 | grep "long mode automaticaly triggered"
rm -rf tmp*
println "\n===> large files tests "
roundTripTest -g270000000 1