Add softrandommap and --alloc-size options
[fio.git] / filesetup.c
index 6c5770b463b035b6a77cbe7300855a65967eff8f..b356b447ddaeadffa01f4d551ea868621cff3220 100644 (file)
@@ -579,6 +579,13 @@ int init_random_map(struct thread_data *td)
                        f->num_maps = num_maps;
                        continue;
                }
                        f->num_maps = num_maps;
                        continue;
                }
+               if (!td->o.softrandommap) {
+                       log_err("fio: failed allocating random map. If running"
+                               " a large number of jobs, try the 'norandommap'"
+                               " option or set 'softrandommap'. Or give"
+                               " a larger --alloc-size to fio.\n");
+                       return 1;
+               }
 
                log_info("fio: file %s failed allocating random map. Running "
                         "job without.\n", f->file_name);
 
                log_info("fio: file %s failed allocating random map. Running "
                         "job without.\n", f->file_name);