client: don't leak file descriptor on exit
[fio.git] / verify.c
index 5fe78c8cf556893fafccda5f485beca158e68ca0..f25eab921fc379691466b9e8c3866efd3a2133eb 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -78,7 +78,7 @@ static unsigned int get_hdr_inc(struct thread_data *td, struct io_u *io_u)
        unsigned int hdr_inc;
 
        hdr_inc = io_u->buflen;
-       if (td->o.verify_interval)
+       if (td->o.verify_interval && td->o.verify_interval <= io_u->buflen)
                hdr_inc = td->o.verify_interval;
 
        return hdr_inc;
@@ -973,6 +973,7 @@ int get_next_verify(struct thread_data *td, struct io_u *io_u)
                io_u->offset = ipo->offset;
                io_u->buflen = ipo->len;
                io_u->file = ipo->file;
+               io_u->flags |= IO_U_F_VER_LIST;
 
                if (ipo->flags & IP_F_TRIMMED)
                        io_u->flags |= IO_U_F_TRIMMED;