- if (!td->o.zero_buffers)
- fill_random_buf(&td->buf_state, io_u->buf, max_bs);
- else
+ if (!td->o.zero_buffers) {
+ unsigned int perc = td->o.compress_percentage;
+
+ if (perc) {
+ unsigned int seg = min_write;
+
+ seg = min(min_write, td->o.compress_chunk);
+ fill_random_buf_percentage(&td->buf_state, io_u->buf,
+ perc, seg, max_bs);
+ } else
+ fill_random_buf(&td->buf_state, io_u->buf, max_bs);
+ } else