sync engine: add support for pwritev/preadv
[fio.git] / init.c
diff --git a/init.c b/init.c
index ff9b6d432e585e063b82556fca88f764c8f11105..7246bd83c268dacac75c6de94027227bb1e7fb72 100644 (file)
--- a/init.c
+++ b/init.c
@@ -621,6 +621,14 @@ static int fixup_options(struct thread_data *td)
        if (td->o.random_distribution != FIO_RAND_DIST_RANDOM)
                td->o.norandommap = 1;
 
+       /*
+        * If size is set but less than the min block size, complain
+        */
+       if (o->size && o->size < td_min_bs(td)) {
+               log_err("fio: size too small, must be larger than the IO size: %llu\n", (unsigned long long) o->size);
+               ret = 1;
+       }
+
        return ret;
 }
 
@@ -693,6 +701,7 @@ static void td_fill_rand_seeds_os(struct thread_data *td)
                td->rand_seeds[FIO_RAND_BLOCK_OFF] = FIO_RANDSEED * td->thread_number;
 
        os_random_seed(td->rand_seeds[FIO_RAND_BLOCK_OFF], &td->random_state);
+       os_random_seed(td->rand_seeds[FIO_RAND_SEQ_RAND_OFF], &td->seq_rand_state);
 }
 
 static void td_fill_rand_seeds_internal(struct thread_data *td)
@@ -714,6 +723,7 @@ static void td_fill_rand_seeds_internal(struct thread_data *td)
                td->rand_seeds[FIO_RAND_BLOCK_OFF] = FIO_RANDSEED * td->thread_number;
 
        init_rand_seed(&td->__random_state, td->rand_seeds[FIO_RAND_BLOCK_OFF]);
+       init_rand_seed(&td->__seq_rand_state, td->rand_seeds[FIO_RAND_SEQ_RAND_OFF]);
 }
 
 void td_fill_rand_seeds(struct thread_data *td)
@@ -1716,6 +1726,8 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
                        }
 
                        ret = fio_cmd_option_parse(td, opt, val);
+                       if (ret)
+                               do_exit++;
 
                        if (!ret && !strcmp(opt, "ioengine")) {
                                free_ioengine(td);