crc: ensure we properly match test name
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index f68b2139ef8de06d6946b8e3fbed208dc0691a55..64ff73cd5555b8d4efa0303085f7944cae07544c 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -1285,6 +1285,7 @@ again:
                io_u->acct_ddir = -1;
                td->cur_depth++;
                io_u->flags |= IO_U_F_IN_CUR_DEPTH;
+               io_u->ipo = NULL;
        } else if (td->o.verify_async) {
                /*
                 * We ran out, wait for async verify threads to finish and
@@ -1568,6 +1569,15 @@ static void io_completed(struct thread_data *td, struct io_u *io_u,
        td_io_u_lock(td);
        assert(io_u->flags & IO_U_F_FLIGHT);
        io_u->flags &= ~(IO_U_F_FLIGHT | IO_U_F_BUSY_OK);
+
+       /*
+        * Mark IO ok to verify
+        */
+       if (io_u->ipo) {
+               io_u->ipo->flags &= ~IP_F_IN_FLIGHT;
+               write_barrier();
+       }
+
        td_io_u_unlock(td);
 
        if (ddir_sync(io_u->ddir)) {