From: Jens Axboe Date: Mon, 22 Oct 2012 18:36:26 +0000 (+0200) Subject: backend: only check bytes_done for engines without FIO_NOIO X-Git-Tag: fio-2.0.11~48 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=d5abee06d57595679bf8f5fbe70c532a3d8cfdba;hp=d0b937ed8841484c2d651919943e8e4c70dfd460 backend: only check bytes_done for engines without FIO_NOIO This basically reverts the functional part of commit 2557f7e6. Instead of having to fiddle with the io_u manually, have the backend check whether we expect data to have been transerred or not. Signed-off-by: Jens Axboe --- diff --git a/backend.c b/backend.c index 3b42c4df..1c944d6a 100644 --- a/backend.c +++ b/backend.c @@ -726,7 +726,7 @@ sync_done: if (ret < 0) break; - if (!ddir_rw_sum(bytes_done)) + if (!ddir_rw_sum(bytes_done) && !(td->io_ops->flags & FIO_NOIO)) continue; if (!in_ramp_time(td) && should_check_rate(td, bytes_done)) { diff --git a/engines/cpu.c b/engines/cpu.c index 322dfde7..8bc9fd5c 100644 --- a/engines/cpu.c +++ b/engines/cpu.c @@ -10,11 +10,6 @@ static int fio_cpuio_queue(struct thread_data *td, struct io_u fio_unused *io_u) { usec_spin(td->o.cpucycle); - - if (io_u->buflen == 0) - io_u->buflen = 1; - io_u->resid = 0; - return FIO_Q_COMPLETED; }