dprint(FD_FILE, "truncate file %s, size %llu\n", f->file_name,
(unsigned long long) f->real_file_size);
if (ftruncate(f->fd, f->real_file_size) == -1) {
- td_verror(td, errno, "ftruncate");
- goto err;
+ if (errno != EFBIG) {
+ td_verror(td, errno, "ftruncate");
+ goto err;
+ }
}
}
td->files_index = 0;
td->files = NULL;
td->file_locks = NULL;
+ td->o.file_lock_mode = FILE_LOCK_NONE;
td->o.nr_files = 0;
}
void unlock_file_all(struct thread_data *td, struct fio_file *f)
{
+ if (td->o.file_lock_mode == FILE_LOCK_NONE)
+ return;
if (td->file_locks[f->fileno] != FILE_LOCK_NONE)
unlock_file(td, f);
}