From 6269123ce8a6e3af12478043118b2dfa2db7438c Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 23 Nov 2015 12:28:11 -0700 Subject: [PATCH 1/1] options: set 'refill_buffers' for compress_percentage != 0 Only do it if the user hasn't set it. Signed-off-by: Jens Axboe --- init.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; } /* -- 2.25.1