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;
}
}
}
-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;
bool ret;
fio_file_hash_lock();
- ret = __is_already_allocated(fname);
+ ret = __is_already_allocated(fname, false);
fio_file_hash_unlock();
return ret;
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;
}
f = smalloc(sizeof(*f));
if (!f) {
- log_err("fio: smalloc OOM\n");
assert(0);
return NULL;
}
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);
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;
}