X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=fio.c;h=5432e383d439319eb918b3dd4162c2df774b0337;hb=e5b401d4bf67a1704f28872d3abe09eaf65cdabe;hp=cf85765ec2423c3d5a4e3bd1583c1ed8473636d6;hpb=e29d1b70a21e29801fb35dfbc1b236b7c8514055;p=fio.git diff --git a/fio.c b/fio.c index cf85765e..5432e383 100644 --- a/fio.c +++ b/fio.c @@ -553,31 +553,26 @@ static void cleanup_pending_aio(struct thread_data *td) } } -static int do_io_u_verify(struct thread_data *td, struct io_u **io_u) -{ - struct io_u *v_io_u = *io_u; - int ret = 0; - - if (v_io_u) { - ret = verify_io_u(v_io_u); - put_io_u(td, v_io_u); - *io_u = NULL; - } - - return ret; -} - /* * The main verify engine. Runs over the writes we previusly submitted, * reads the blocks back in, and checks the crc/md5 of the data. */ -static void do_verify(struct thread_data *td) +void do_verify(struct thread_data *td) { struct timeval t; struct io_u *io_u, *v_io_u = NULL; struct io_completion_data icd; struct fio_file *f; - int ret; + int ret, i; + + /* + * sync io first and invalidate cache, to make sure we really + * read from disk. + */ + for_each_file(td, f, i) { + td_io_sync(td, f); + file_invalidate_cache(td, f); + } td_set_runstate(td, TD_VERIFYING);