Remove extra space in tausworthe32 warning message
[fio.git] / filesetup.c
index c6ef3bf2744f52a70e8bf845a65d4877ed7e8e4b..969e7cc0a70e4a06ce6c287f6f88dcc8d0c87b68 100644 (file)
@@ -1098,7 +1098,7 @@ static int check_rand_gen_limits(struct thread_data *td, struct fio_file *f,
        if (!fio_option_is_set(&td->o, random_generator)) {
                log_info("fio: Switching to tausworthe64. Use the "
                         "random_generator= option to get rid of this "
-                        " warning.\n");
+                        "warning.\n");
                td->o.random_generator = FIO_RAND_GEN_TAUSWORTHE64;
                return 0;
        }
@@ -1242,12 +1242,14 @@ static void get_file_type(struct fio_file *f)
        }
 }
 
-static bool __is_already_allocated(const char *fname)
+static bool __is_already_allocated(const char *fname, bool set)
 {
        struct flist_head *entry;
+       bool ret;
 
-       if (flist_empty(&filename_list))
-               return false;
+       ret = file_bloom_exists(fname, set);
+       if (!ret)
+               return ret;
 
        flist_for_each(entry, &filename_list) {
                struct file_name *fn;
@@ -1266,7 +1268,7 @@ static bool is_already_allocated(const char *fname)
        bool ret;
 
        fio_file_hash_lock();
-       ret = __is_already_allocated(fname);
+       ret = __is_already_allocated(fname, false);
        fio_file_hash_unlock();
 
        return ret;
@@ -1280,7 +1282,7 @@ static void set_already_allocated(const char *fname)
        fn->filename = strdup(fname);
 
        fio_file_hash_lock();
-       if (!__is_already_allocated(fname)) {
+       if (!__is_already_allocated(fname, true)) {
                flist_add_tail(&fn->list, &filename_list);
                fn = NULL;
        }
@@ -1317,7 +1319,6 @@ static struct fio_file *alloc_new_file(struct thread_data *td)
 
        f = smalloc(sizeof(*f));
        if (!f) {
-               log_err("fio: smalloc OOM\n");
                assert(0);
                return NULL;
        }
@@ -1400,10 +1401,8 @@ int add_file(struct thread_data *td, const char *fname, int numjob, int inc)
                f->real_file_size = -1ULL;
 
        f->file_name = smalloc_strdup(file_name);
-       if (!f->file_name) {
-               log_err("fio: smalloc OOM\n");
+       if (!f->file_name)
                assert(0);
-       }
 
        get_file_type(f);
 
@@ -1606,10 +1605,8 @@ void dup_files(struct thread_data *td, struct thread_data *org)
 
                if (f->file_name) {
                        __f->file_name = smalloc_strdup(f->file_name);
-                       if (!__f->file_name) {
-                               log_err("fio: smalloc OOM\n");
+                       if (!__f->file_name)
                                assert(0);
-                       }
 
                        __f->filetype = f->filetype;
                }