If verify is enabled, automatically enable refill_buffers
[fio.git] / init.c
diff --git a/init.c b/init.c
index 8683ba63a67b16fef47401541c6792b8f55c7504..2a3fcee73ddb7eeb9839650ba3ee28286f6ca581 100644 (file)
--- a/init.c
+++ b/init.c
@@ -19,7 +19,7 @@
 #include "smalloc.h"
 #include "filehash.h"
 
-static char fio_version_string[] = "fio 1.20-rc2";
+static char fio_version_string[] = "fio 1.20";
 
 #define FIO_RANDSEED           (0xb1899bedUL)
 
@@ -118,6 +118,11 @@ static struct option l_opts[FIO_NR_OPTIONS] = {
                .has_arg        = required_argument,
                .val            = 'x',
        },
+       {
+               .name           = "alloc-size",
+               .has_arg        = required_argument,
+               .val            = 'a',
+       },
        {
                .name           = NULL,
        },
@@ -309,6 +314,9 @@ 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)
+               td->o.refill_buffers = 1;
+
        return 0;
 }
 
@@ -446,7 +454,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
                td->io_ops->flags |= FIO_RAWIO;
 
        file_alloced = 0;
-       if (!td->o.filename && !td->files_index) {
+       if (!td->o.filename && !td->files_index && !td->o.read_iolog_file) {
                file_alloced = 1;
 
                if (td->o.nr_files == 1 && exists_and_not_file(jobname))
@@ -826,6 +834,8 @@ static void usage(const char *name)
        printf("\t--readonly\tTurn on safety read-only checks, preventing"
                " writes\n");
        printf("\t--section=name\tOnly run specified section in job file\n");
+       printf("\t--alloc-size=kb\tSet smalloc pool to this size in kb"
+               " (def 1024)\n");
 }
 
 #ifdef FIO_INC_DEBUG
@@ -897,6 +907,9 @@ static int parse_cmd_line(int argc, char *argv[])
 
        while ((c = getopt_long_only(argc, argv, "", l_opts, &lidx)) != -1) {
                switch (c) {
+               case 'a':
+                       smalloc_pool_size = atoi(optarg);
+                       break;
                case 't':
                        def_timeout = atoi(optarg);
                        break;