Fio 3.34
[fio.git] / init.c
diff --git a/init.c b/init.c
index b7f866e65972b7882e123669cb7ec871404f2630..442dab427365b2d74d19b12ef495124a56579782 100644 (file)
--- a/init.c
+++ b/init.c
@@ -916,12 +916,6 @@ static int fixup_options(struct thread_data *td)
                ret |= 1;
        }
 
-       /*
-        * O_ATOMIC implies O_DIRECT
-        */
-       if (o->oatomic)
-               o->odirect = 1;
-
        /*
         * If randseed is set, that overrides randrepeat
         */
@@ -1411,15 +1405,14 @@ static void gen_log_name(char *name, size_t size, const char *logtype,
 
 static int check_waitees(char *waitee)
 {
-       struct thread_data *td;
-       int i, ret = 0;
+       int ret = 0;
 
-       for_each_td(td, i) {
+       for_each_td(td) {
                if (td->subjob_number)
                        continue;
 
                ret += !strcmp(td->o.name, waitee);
-       }
+       } end_for_each();
 
        return ret;
 }
@@ -1454,10 +1447,7 @@ static bool wait_for_ok(const char *jobname, struct thread_options *o)
 
 static int verify_per_group_options(struct thread_data *td, const char *jobname)
 {
-       struct thread_data *td2;
-       int i;
-
-       for_each_td(td2, i) {
+       for_each_td(td2) {
                if (td->groupid != td2->groupid)
                        continue;
 
@@ -1467,7 +1457,7 @@ static int verify_per_group_options(struct thread_data *td, const char *jobname)
                                jobname);
                        return 1;
                }
-       }
+       } end_for_each();
 
        return 0;
 }
@@ -1541,7 +1531,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
        if (fixup_options(td))
                goto err;
 
-       if (init_dedupe_working_set_seeds(td))
+       if (!td->o.dedupe_global && init_dedupe_working_set_seeds(td, 0))
                goto err;
 
        /*
@@ -2269,7 +2259,7 @@ static void usage(const char *name)
        printf("  --minimal\t\tMinimal (terse) output\n");
        printf("  --output-format=type\tOutput format (terse,json,json+,normal)\n");
        printf("  --terse-version=type\tSet terse version output format"
-               " (default 3, or 2 or 4)\n");
+               " (default 3, or 2 or 4 or 5)\n");
        printf("  --version\t\tPrint version info and exit\n");
        printf("  --help\t\tPrint this page\n");
        printf("  --cpuclock-test\tPerform test/validation of CPU clock\n");
@@ -2810,6 +2800,15 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
                                break;
 
                        ret = fio_cmd_ioengine_option_parse(td, opt, val);
+
+                       if (ret) {
+                               if (td) {
+                                       put_job(td);
+                                       td = NULL;
+                               }
+                               do_exit++;
+                               exit_val = 1;
+                       }
                        break;
                }
                case 'w':
@@ -2990,7 +2989,7 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
                        log_err("%s: unrecognized option '%s'\n", argv[0],
                                                        argv[optind - 1]);
                        show_closest_option(argv[optind - 1]);
-                       fallthrough;
+                       fio_fallthrough;
                default:
                        do_exit++;
                        exit_val = 1;