X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=dc4473beab1737660f2ebeb2f1c91418b1a14da6;hp=b2b72302d58ee8b0790fb123dd882c508bbd9360;hb=cbe8d7561cf6d81d741d87eb7940db2a111d2144;hpb=0dd2d11ea010566fd2bc2661af58a0eefe49f750 diff --git a/io_u.c b/io_u.c index b2b72302..dc4473be 100644 --- a/io_u.c +++ b/io_u.c @@ -983,6 +983,14 @@ struct io_u *get_io_u(struct thread_data *td) populate_verify_io_u(td, io_u); else if (td->o.refill_buffers && io_u->ddir == DDIR_WRITE) io_u_fill_buffer(td, io_u, io_u->xfer_buflen); + else if (io_u->ddir == DDIR_READ) { + /* + * Reset the buf_filled parameters so next time if the + * buffer is used for writes it is refilled. + */ + io_u->buf_filled = 0; + io_u->buf_filled_len = 0; + } } /*