X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;ds=sidebyside;f=init.c;h=0100da213a2420db2487b24979895b4c68468455;hb=095196b1e76b1722c37beeeba7df7b2a615688a0;hp=af35ee6810eefdc1828bbb688b6802cd951c309d;hpb=d883efbdb2034b4ab23abec9cee1762d6d476247;p=fio.git diff --git a/init.c b/init.c index af35ee68..0100da21 100644 --- a/init.c +++ b/init.c @@ -27,7 +27,7 @@ #include "filelock.h" #include "lib/getopt.h" -#include "lib/strcasestr.h" +#include "oslib/strcasestr.h" #include "crc/test.h" @@ -737,11 +737,16 @@ static int fixup_options(struct thread_data *td) /* * For fully compressible data, just zero them at init time. - * It's faster than repeatedly filling it. + * It's faster than repeatedly filling it. For non-zero + * compression, we should have refill_buffers set. Set it, unless + * the job file already changed it. */ - if (td->o.compress_percentage == 100) { - td->o.zero_buffers = 1; - td->o.compress_percentage = 0; + if (o->compress_percentage) { + if (o->compress_percentage == 100) { + o->zero_buffers = 1; + o->compress_percentage = 0; + } else if (!fio_option_is_set(o, refill_buffers)) + o->refill_buffers = 1; } /* @@ -1894,6 +1899,9 @@ static int set_debug(const char *string) char *opt; int i; + if (!string) + return 0; + if (!strcmp(string, "?") || !strcmp(string, "help")) { log_info("fio: dumping debug options:"); for (i = 0; debug_levels[i].name; i++) {