From d0656a93fbacc0cf0d6f405407b55b768affa949 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 1 Feb 2008 18:33:23 +0100 Subject: [PATCH] CPU burn engine fix It's ok to have zero buflen, if we are not doing real IO. Signed-off-by: Jens Axboe --- io_u.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_u.c b/io_u.c index d54d0285..42ad37b5 100644 --- a/io_u.c +++ b/io_u.c @@ -733,7 +733,7 @@ struct io_u *get_io_u(struct thread_data *td) assert(f->flags & FIO_FILE_OPEN); if (io_u->ddir != DDIR_SYNC) { - if (!io_u->buflen) { + if (!io_u->buflen && !(td->io_ops->flags & FIO_NOIO)) { dprint(FD_IO, "get_io_u: zero buflen on %p\n", io_u); goto err_put; } -- 2.25.1