X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=b7945cf35e81f0a4a1321268e55f6efd00505eee;hp=af35ee6810eefdc1828bbb688b6802cd951c309d;hb=6269123ce8a6e3af12478043118b2dfa2db7438c;hpb=1e7f82e20c088e3f564ad24e37bb873b7ac37d3a diff --git a/init.c b/init.c index af35ee68..b7945cf3 100644 --- a/init.c +++ b/init.c @@ -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; } /*