More cpu engine fixes
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c
index 0ec4f5a..6f9a378 100644
--- a/fio.c
+++ b/fio.c
@@ -657,10 +657,12 @@
memset(io_u, 0, sizeof(*io_u));
INIT_LIST_HEAD(&io_u->list);
- io_u->buf = p + max_bs * i;
+ if (!(td->io_ops->flags & FIO_NOIO)) {
+ io_u->buf = p + max_bs * i;
- if (td_write(td))
- fill_io_buf(td, io_u, max_bs);
+ if (td_write(td))
+ fill_io_buf(td, io_u, max_bs);
+ }
io_u->index = i;
io_u->flags = IO_U_F_FREE;
diff --git a/io_u.c b/io_u.c
index 4750ac6..cab0980 100644
--- a/io_u.c
+++ b/io_u.c
@@ -313,6 +313,9 @@
static int fill_io_u(struct thread_data *td, struct io_u *io_u)
{
+ if (td->io_ops->flags & FIO_NOIO)
+ goto out;
+
/*
* see if it's time to sync
*/
diff --git a/memory.c b/memory.c
index c147229..5678350 100644
--- a/memory.c
+++ b/memory.c
@@ -145,6 +145,9 @@
{
int ret = 0;
+ if (td->io_ops->flags & FIO_NOIO)
+ return 0;
+
if (td->o.mem_type == MEM_MALLOC)
ret = alloc_mem_malloc(td);
else if (td->o.mem_type == MEM_SHM || td->o.mem_type == MEM_SHMHUGE)
diff --git a/stat.c b/stat.c
index e858d59..604c235 100644
--- a/stat.c
+++ b/stat.c
@@ -293,7 +293,8 @@
double io_u_lat_u[FIO_IO_U_LAT_U_NR];
double io_u_lat_m[FIO_IO_U_LAT_M_NR];
- if (!(ts->io_bytes[0] + ts->io_bytes[1]))
+ if (!(ts->io_bytes[0] + ts->io_bytes[1]) &&
+ !(ts->total_io_u[0] + ts->total_io_u[1]))
return;
if (!ts->error)