X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=io_u.c;h=54f8685bc5c510608e3a6e5e7a7ef09f766ccebf;hb=07d91f3b8c746d2d7f303c0b3130a8a3d8516541;hp=703d1e85e45ad570715d237bd3dc96fccff6f020;hpb=ed33585509a97c4a65e46967cb49419b6a4f8870;p=fio.git diff --git a/io_u.c b/io_u.c index 703d1e85..54f8685b 100644 --- a/io_u.c +++ b/io_u.c @@ -496,12 +496,17 @@ static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir) /* * We are going to sleep, ensure that we flush anything pending as - * not to skew our latency numbers + * not to skew our latency numbers. + * + * Changed to only monitor 'in flight' requests here instead of the + * td->cur_depth, b/c td->cur_depth does not accurately represent + * io's that have been actually submitted to an async engine, + * and cur_depth is meaningless for sync engines. */ - if (td->cur_depth) { + if (td->io_u_in_flight) { int fio_unused ret; - ret = io_u_queued_complete(td, td->cur_depth, NULL); + ret = io_u_queued_complete(td, td->io_u_in_flight, NULL); } fio_gettime(&t, NULL); @@ -1142,6 +1147,7 @@ static void small_content_scramble(struct io_u *io_u) p = io_u->xfer_buf; boffset = io_u->offset; + io_u->buf_filled_len = 0; for (i = 0; i < nr_blocks; i++) { /*