verify: fix verification of uncompleted or errored ios
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index 4b0b5a7a11bdb002f72d552c89ee4ce8c4fd6b4e..e132fd9d2d98bab78eae9af8c8706a1e30b07c98 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -1622,8 +1622,15 @@ static void io_completed(struct thread_data *td, struct io_u *io_u,
         * Mark IO ok to verify
         */
        if (io_u->ipo) {
-               io_u->ipo->flags &= ~IP_F_IN_FLIGHT;
-               write_barrier();
+               /*
+                * Remove errored entry from the verification list
+                */
+               if (io_u->error)
+                       unlog_io_piece(td, io_u);
+               else {
+                       io_u->ipo->flags &= ~IP_F_IN_FLIGHT;
+                       write_barrier();
+               }
        }
 
        td_io_u_unlock(td);