+ return fio_mmap_file(td, f, f->mmap_sz, f->mmap_off);
+}
+
+/*
+ * Attempt to mmap the entire file
+ */
+static int fio_mmapio_prep_full(struct thread_data *td, struct io_u *io_u)
+{
+ struct fio_file *f = io_u->file;
+ int ret;
+
+ if (fio_file_partial_mmap(f))
+ return EINVAL;
+
+ if (f->mmap_ptr) {
+ if (munmap(f->mmap_ptr, f->mmap_sz) < 0)
+ return errno;
+ f->mmap_ptr = NULL;
+ }
+
+ f->mmap_sz = f->io_size;
+ f->mmap_off = 0;
+