Set verify_interval to minimum blocksize if not given
[fio.git] / init.c
diff --git a/init.c b/init.c
index a79bd1a666a0ed6d2bc5562089c578abaec5f2d6..e7245ade0313ef92fa659e60250223b729448986 100644 (file)
--- a/init.c
+++ b/init.c
@@ -178,6 +178,8 @@ static void put_job(struct thread_data *td)
 {
        if (td == &def_thread)
                return;
+       
+       profile_td_exit(td);
 
        if (td->error)
                log_info("fio: %s\n", td->verror);
@@ -356,8 +358,12 @@ static int fixup_options(struct thread_data *td)
                log_info("fio: mixed read/write workload with verify. May not "
                 "work as expected, unless you pre-populated the file\n");
 
-       if (td->o.verify != VERIFY_NONE)
+       if (td->o.verify != VERIFY_NONE) {
                td->o.refill_buffers = 1;
+               if (o->max_bs[DDIR_WRITE] != o->min_bs[DDIR_WRITE] &&
+                   !o->verify_interval)
+                       o->verify_interval = o->min_bs[DDIR_WRITE];
+       }
 
        if (td->o.pre_read) {
                td->o.invalidate_cache = 0;
@@ -502,6 +508,9 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
                return 0;
        }
 
+       if (profile_td_init(td))
+               return 1;
+
        engine = get_engine_name(td->o.ioengine);
        td->io_ops = load_ioengine(td, engine);
        if (!td->io_ops) {