X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=428b312c9b34fea3cd1db6d38b375fd1a14376e6;hp=703d1e85e45ad570715d237bd3dc96fccff6f020;hb=422f9e4b57549ce1e163b9c1de71932d9ea24de4;hpb=ed33585509a97c4a65e46967cb49419b6a4f8870 diff --git a/io_u.c b/io_u.c index 703d1e85..428b312c 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);