summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f52e919)
This will cause writes to always refill the buffer, which is needed
to avoid having the reads garble the contents.
Signed-off-by: Jens Axboe <axboe@fb.com>
assert(ret != 0);
td->o.buffer_pattern_bytes = ret;
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;
td->o.refill_buffers = 0;
+ else
+ td->o.refill_buffers = 1;
+
td->o.scramble_buffers = 0;
td->o.zero_buffers = 0;
td->o.scramble_buffers = 0;
td->o.zero_buffers = 0;