X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=options.c;h=b489e90210ae008be47b427195242a56272daa90;hb=002e57665ed7eebe920de6f1729ef2e403b7c6cc;hp=85574d7f818a2c33a9fc534d74793431914a4f14;hpb=29ac257cb18a38c20f970bd02f2bfb3a027309d5;p=fio.git diff --git a/options.c b/options.c index 85574d7f..b489e902 100644 --- a/options.c +++ b/options.c @@ -1306,8 +1306,17 @@ static int str_buffer_pattern_cb(void *data, const char *input) assert(ret != 0); td->o.buffer_pattern_bytes = ret; - if (!td->o.compress_percentage) + + /* + * If this job is doing any reading or has compression set, + * ensure that we refill buffers for writes or we could be + * invalidating the pattern through reads. + */ + if (!td->o.compress_percentage && !td_read(td)) td->o.refill_buffers = 0; + else + td->o.refill_buffers = 1; + td->o.scramble_buffers = 0; td->o.zero_buffers = 0;