Improve rate limiting
[fio.git] / verify.c
index 3f27e5ac0775f8e645b7e85574371e013e90595f..2ae74b93c28e7e6a2c7c71165a5dc98a76b876ea 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -7,6 +7,7 @@
 #include <assert.h>
 
 #include "fio.h"
+#include "verify.h"
 
 #include "crc/md5.h"
 #include "crc/crc64.h"
@@ -696,7 +697,7 @@ int get_next_verify(struct thread_data *td, struct io_u *io_u)
                io_u->buflen = ipo->len;
                io_u->file = ipo->file;
 
-               if ((io_u->file->flags & FIO_FILE_OPEN) == 0) {
+               if (!fio_file_open(io_u->file)) {
                        int r = td_io_open_file(td, io_u->file);
 
                        if (r) {
@@ -707,7 +708,7 @@ int get_next_verify(struct thread_data *td, struct io_u *io_u)
                }
 
                get_file(ipo->file);
-               assert(io_u->file->flags & FIO_FILE_OPEN);
+               assert(fio_file_open(io_u->file));
                io_u->ddir = DDIR_READ;
                io_u->xfer_buf = io_u->buf;
                io_u->xfer_buflen = io_u->buflen;