From: Jens Axboe Date: Wed, 21 Feb 2007 19:28:14 +0000 (+0100) Subject: Correct io_u_*_complete() return checking X-Git-Tag: fio-1.12~41 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=49db69aa2e89afde2c5e2a768a464302af96b6cb Correct io_u_*_complete() return checking An error is < 0, not any non-zero value... This unbreaks verify again. Signed-off-by: Jens Axboe --- diff --git a/fio.c b/fio.c index ae89bb93..75c2c869 100644 --- a/fio.c +++ b/fio.c @@ -197,7 +197,7 @@ requeue: put_io_u(td, io_u); return 1; } else if (ret == FIO_Q_QUEUED) { - if (io_u_queued_complete(td, 1, NULL)) + if (io_u_queued_complete(td, 1, NULL) < 0) return 1; } else if (ret == FIO_Q_COMPLETED) { if (io_u->error) { @@ -272,7 +272,7 @@ requeue: goto requeue; } ret = io_u_sync_complete(td, io_u, verify_io_u); - if (ret) + if (ret < 0) break; continue; case FIO_Q_QUEUED: @@ -306,7 +306,7 @@ requeue: * Reap required number of io units, if any, and do the * verification on them through the callback handler */ - if (io_u_queued_complete(td, min_events, verify_io_u)) + if (io_u_queued_complete(td, min_events, verify_io_u) < 0) break; }