Don't clear 'refill_buffers' unconditionally for pattern fill
authorJens Axboe <axboe@fb.com>
Thu, 4 Dec 2014 15:27:21 +0000 (08:27 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 4 Dec 2014 15:27:21 +0000 (08:27 -0700)
If we have asked for a specific buffer compression, then we need
the refill option (if set).

Signed-off-by: Jens Axboe <axboe@fb.com>
options.c

index 23469d8d793c5d51f7e1c41bc809fca194d92918..c3c6292733b29f4a59272109eff7eab20fdb5720 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1031,7 +1031,8 @@ static int str_buffer_pattern_cb(void *data, const char *input)
                                &td->o.buffer_pattern_bytes);
 
        if (!ret && td->o.buffer_pattern_bytes) {
-               td->o.refill_buffers = 0;
+               if (!td->o.compress_percentage)
+                       td->o.refill_buffers = 0;
                td->o.scramble_buffers = 0;
                td->o.zero_buffers = 0;
        } else {