- fill_random_buf_percentage(&td->buf_state, buf,
- perc, seg, max_bs);
- } else
- fill_random_buf(&td->buf_state, buf, max_bs);
- } else
+ if (perc) {
+ this_write = min_not_zero(min_write,
+ td->o.compress_chunk);
+
+ fill_random_buf_percentage(rs, buf, perc,
+ this_write, this_write,
+ o->buffer_pattern,
+ o->buffer_pattern_bytes);
+ } else {
+ fill_random_buf(rs, buf, min_write);
+ this_write = min_write;
+ }
+
+ buf += this_write;
+ left -= this_write;
+ save_buf_state(td, rs);
+ } while (left);
+ } else if (o->buffer_pattern_bytes)
+ fill_buffer_pattern(td, buf, max_bs);
+ else if (o->zero_buffers)