X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;ds=sidebyside;f=io_u.c;h=1013c7fd0aeaa515b41cd2465272f0ecda4514ae;hb=cc8350abf69ad3693d8f9f43173d326c4c7596db;hp=8567e11664bebe0a00cb8277d9ad054bc3a7b6a9;hpb=bcd5abfa9f230bbe4365dad1289fdea1f5509f74;p=fio.git diff --git a/io_u.c b/io_u.c index 8567e116..1013c7fd 100644 --- a/io_u.c +++ b/io_u.c @@ -16,7 +16,7 @@ struct io_completion_data { int nr; /* input */ int error; /* output */ - unsigned long bytes_done[DDIR_RWDIR_CNT]; /* output */ + uint64_t bytes_done[DDIR_RWDIR_CNT]; /* output */ struct timeval time; /* output */ }; @@ -497,7 +497,7 @@ static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir) * We have too much pending sleep in this direction. See if we * should switch. */ - if (td_rw(td)) { + if (td_rw(td) && td->o.rwmix[odir]) { /* * Other direction does not have too much pending, switch */ @@ -545,6 +545,7 @@ static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir) if (ddir_trim(ddir)) return ddir; + return ddir; } @@ -1493,7 +1494,7 @@ static void ios_completed(struct thread_data *td, * Complete a single io_u for the sync engines. */ int io_u_sync_complete(struct thread_data *td, struct io_u *io_u, - unsigned long *bytes) + uint64_t *bytes) { struct io_completion_data icd; @@ -1522,7 +1523,7 @@ int io_u_sync_complete(struct thread_data *td, struct io_u *io_u, * Called to complete min_events number of io for the async engines. */ int io_u_queued_complete(struct thread_data *td, int min_evts, - unsigned long *bytes) + uint64_t *bytes) { struct io_completion_data icd; struct timespec *tvp = NULL;