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;
}
}
}
-
static void free_already_allocated(void)
{
struct flist_head *entry, *tmp;
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;
}
lfsr_reset(&f->lfsr, td->rand_seeds[FIO_RAND_BLOCK_OFF]);
}
-int fio_files_done(struct thread_data *td)
+bool fio_files_done(struct thread_data *td)
{
struct fio_file *f;
unsigned int i;
for_each_file(td, f, i)
if (!fio_file_done(f))
- return 0;
+ return false;
- return 1;
+ return true;
}
/* free memory used in initialization phase only */