Allow OR'able option values
[fio.git] / verify.c
index faa5684d9dafa369551c41c4faf045b2fa4ad469..c894b600525c5969d5ddefb1d9eafe51c6a7ece9 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -212,7 +212,7 @@ static int verify_io_u_sha256(struct verify_header *hdr, struct io_u *io_u,
 {
        void *p = io_u_verify_off(hdr, io_u, header_num);
        struct vhdr_sha256 *vh = hdr_priv(hdr);
-       uint8_t sha256[128];
+       uint8_t sha256[64];
        struct sha256_ctx sha256_ctx = {
                .buf = sha256,
        };
@@ -437,12 +437,17 @@ int verify_io_u_async(struct thread_data *td, struct io_u *io_u)
        io_u->file = NULL;
 
        pthread_mutex_lock(&td->io_u_lock);
+       
+       if (io_u->flags & IO_U_F_IN_CUR_DEPTH) {
+               td->cur_depth--;
+               io_u->flags &= ~IO_U_F_IN_CUR_DEPTH;
+       }
        flist_del(&io_u->list);
        flist_add_tail(&io_u->list, &td->verify_list);
+       io_u->flags |= IO_U_F_FREE_DEF;
        pthread_mutex_unlock(&td->io_u_lock);
 
        pthread_cond_signal(&td->verify_cond);
-       io_u->flags |= IO_U_F_FREE_DEF;
        return 0;
 }
 
@@ -473,7 +478,9 @@ int verify_io_u(struct thread_data *td, struct io_u *io_u)
                hdr = p;
 
                if (hdr->fio_magic != FIO_HDR_MAGIC) {
-                       log_err("Bad verify header %x\n", hdr->fio_magic);
+                       log_err("Bad verify header %x at %llu\n",
+                                       hdr->fio_magic,
+                                       io_u->offset + hdr_num * hdr->len);
                        return EILSEQ;
                }