X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=69f2f19d426053d8fc487affc991534a55c3f4f9;hp=c9a344f27aff5ebcb4a405a34e2da72d0b0b0d4a;hb=b3605062146bce0136918763bb8eb584478ae042;hpb=5be84f23ed3788176d557d9d80a81d4cb1901b22 diff --git a/io_u.c b/io_u.c index c9a344f2..69f2f19d 100644 --- a/io_u.c +++ b/io_u.c @@ -265,10 +265,13 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u) return 0; } -static void io_u_mark_depth(struct thread_data *td) +void io_u_mark_depth(struct thread_data *td, struct io_u *io_u) { int index = 0; + if (io_u->ddir == DDIR_SYNC) + return; + switch (td->cur_depth) { default: index++; @@ -287,7 +290,7 @@ static void io_u_mark_depth(struct thread_data *td) } td->ts.io_u_map[index]++; - td->ts.total_io_u++; + td->ts.total_io_u[io_u->ddir]++; } static void io_u_mark_latency(struct thread_data *td, unsigned long msec) @@ -410,7 +413,6 @@ struct io_u *__get_io_u(struct thread_data *td) list_del(&io_u->list); list_add(&io_u->list, &td->io_u_busylist); td->cur_depth++; - io_u_mark_depth(td); } return io_u;