+ ret = file_bloom_exists(fname, set);
+ if (!ret)
+ return ret;
+
+ flist_for_each(entry, &filename_list) {
+ struct file_name *fn;
+
+ fn = flist_entry(entry, struct file_name, list);
+
+ if (!strcmp(fn->filename, fname))
+ return true;
+ }
+
+ return false;
+}
+
+static bool is_already_allocated(const char *fname)
+{
+ bool ret;
+
+ fio_file_hash_lock();
+ ret = __is_already_allocated(fname, false);
+ fio_file_hash_unlock();
+
+ return ret;
+}
+
+static void set_already_allocated(const char *fname)
+{
+ struct file_name *fn;
+
+ fn = malloc(sizeof(struct file_name));
+ fn->filename = strdup(fname);
+
+ fio_file_hash_lock();
+ if (!__is_already_allocated(fname, true)) {
+ flist_add_tail(&fn->list, &filename_list);
+ fn = NULL;
+ }
+ fio_file_hash_unlock();
+
+ if (fn) {
+ free(fn->filename);
+ free(fn);
+ }
+}
+
+static void free_already_allocated(void)
+{
+ struct flist_head *entry, *tmp;
+ struct file_name *fn;
+
+ if (flist_empty(&filename_list))
+ return;
+
+ fio_file_hash_lock();
+ flist_for_each_safe(entry, tmp, &filename_list) {
+ fn = flist_entry(entry, struct file_name, list);
+ free(fn->filename);
+ flist_del(&fn->list);
+ free(fn);
+ }
+
+ fio_file_hash_unlock();
+}
+
+static struct fio_file *alloc_new_file(struct thread_data *td)
+{
+ struct fio_file *f;