[PATCH] Add end_fsync option
[fio.git] / fio-ini.c
index 109bc14950fca9d798defbd55a28cc939f907feb..a8ed6d5bcf5ae13fd680d44925e9c59703a4b650 100644 (file)
--- a/fio-ini.c
+++ b/fio-ini.c
@@ -726,6 +726,7 @@ int parse_jobs_ini(char *file)
                        }
                        if (!check_int(p, "fsync", &td->fsync_blocks)) {
                                fgetpos(f, &off);
                        }
                        if (!check_int(p, "fsync", &td->fsync_blocks)) {
                                fgetpos(f, &off);
+                               td->end_fsync = 1;
                                continue;
                        }
                        if (!check_int(p, "startdelay", &td->start_delay)) {
                                continue;
                        }
                        if (!check_int(p, "startdelay", &td->start_delay)) {
@@ -760,6 +761,10 @@ int parse_jobs_ini(char *file)
                                fgetpos(f, &off);
                                continue;
                        }
                                fgetpos(f, &off);
                                continue;
                        }
+                       if (!check_int(p, "end_fsync", &td->end_fsync)) {
+                               fgetpos(f, &off);
+                               continue;
+                       }
                        if (!check_int(p, "loops", &td->loops)) {
                                fgetpos(f, &off);
                                continue;
                        if (!check_int(p, "loops", &td->loops)) {
                                fgetpos(f, &off);
                                continue;