io_u: only rewind file position if it's non-zero
[fio.git] / verify.c
index aeafdb5da318c0b6d789e93d991720d71caa8d2d..17af3bb92ab8e0747c532836aa5e9bd1e5ce2812 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -748,9 +748,9 @@ int verify_io_u_async(struct thread_data *td, struct io_u **io_u_ptr)
        }
        flist_add_tail(&io_u->verify_list, &td->verify_list);
        *io_u_ptr = NULL;
-       pthread_mutex_unlock(&td->io_u_lock);
 
        pthread_cond_signal(&td->verify_cond);
+       pthread_mutex_unlock(&td->io_u_lock);
        return 0;
 }
 
@@ -1307,7 +1307,7 @@ int get_next_verify(struct thread_data *td, struct io_u *io_u)
                return 0;
 
        if (!RB_EMPTY_ROOT(&td->io_hist_tree)) {
-               struct rb_node *n = rb_first(&td->io_hist_tree);
+               struct fio_rb_node *n = rb_first(&td->io_hist_tree);
 
                ipo = rb_entry(n, struct io_piece, rb_node);