Still need to put io_u on early exit
authorJens Axboe <jens.axboe@oracle.com>
Wed, 21 Feb 2007 22:02:39 +0000 (23:02 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 21 Feb 2007 22:02:39 +0000 (23:02 +0100)
The previous fix was too drastic, if we don't put the io_u on early
exit, cleanup_pending_aio() will stall forever waiting for it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c

diff --git a/fio.c b/fio.c
index 75c2c86..9594f80 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -248,15 +248,20 @@ static void do_verify(struct thread_data *td)
                if (!io_u)
                        break;
 
-               if (runtime_exceeded(td, &io_u->start_time))
+               if (runtime_exceeded(td, &io_u->start_time)) {
+                       put_io_u(td, io_u);
                        break;
+               }
 
-               if (get_next_verify(td, io_u))
+               if (get_next_verify(td, io_u)) {
+                       put_io_u(td, io_u);
                        break;
+               }
 
-               if (td_io_prep(td, io_u))
+               if (td_io_prep(td, io_u)) {
+                       put_io_u(td, io_u);
                        break;
-
+               }
 requeue:
                ret = td_io_queue(td, io_u);