- }
-
- if (io_u->error)
- td_verror(td, io_u->error, "sync");
-
- return FIO_Q_COMPLETED;
-}
-
-static int fio_mmapio_init(struct thread_data *td)
-{
- struct fio_file *f;
- int i;
-
- if (!td_write(td))
- return 0;
-
- /*
- * We need to truncate the files to the right size, if
- * we are writing to it.
- */
- for_each_file(td, f, i) {
- if (ftruncate(f->fd, f->file_size) < 0) {
- td_verror(td, errno, "ftruncate");
- return 1;