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 75c2c869947d0de6b852e996eccecaa74c197bc4..9594f80582266ce8a8a5794ea9c52fb02a6adb1d 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 (!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;
                        break;
+               }
 
 
-               if (get_next_verify(td, io_u))
+               if (get_next_verify(td, io_u)) {
+                       put_io_u(td, io_u);
                        break;
                        break;
+               }
 
 
-               if (td_io_prep(td, io_u))
+               if (td_io_prep(td, io_u)) {
+                       put_io_u(td, io_u);
                        break;
                        break;
-
+               }
 requeue:
                ret = td_io_queue(td, io_u);
 
 requeue:
                ret = td_io_queue(td, io_u);