Lines Matching defs:td
25 static int fio_mmap_file(struct thread_data *td, struct fio_file *f,
30 if (td_rw(td))
32 else if (td_write(td)) {
35 if (td->o.verify != VERIFY_NONE)
43 td_verror(td, errno, "mmap");
47 if (!td_random(td)) {
49 td_verror(td, errno, "madvise");
54 td_verror(td, errno, "madvise");
60 if (td->error && f->mmap_ptr)
63 return td->error;
69 static int fio_mmapio_prep_limited(struct thread_data *td, struct io_u *io_u)
84 return fio_mmap_file(td, f, f->mmap_sz, f->mmap_off);
90 static int fio_mmapio_prep_full(struct thread_data *td, struct io_u *io_u)
101 ret = fio_mmap_file(td, f, f->mmap_sz, f->mmap_off);
108 static int fio_mmapio_prep(struct thread_data *td, struct io_u *io_u)
129 if (fio_mmapio_prep_full(td, io_u)) {
130 td_clear_error(td);
131 ret = fio_mmapio_prep_limited(td, io_u);
142 static int fio_mmapio_queue(struct thread_data *td, struct io_u *io_u)
146 fio_ro_check(td, io_u);
155 td_verror(td, io_u->error, "msync");
158 int ret = do_io_u_trim(td, io_u);
161 td_verror(td, io_u->error, "trim");
168 if (td->o.odirect && ddir_rw(io_u->ddir)) {
171 td_verror(td, io_u->error, "msync");
175 td_verror(td, io_u->error, "madvise");
182 static int fio_mmapio_init(struct thread_data *td)
184 struct thread_options *o = &td->o;
187 if ((td->o.rw_min_bs & page_mask) &&
194 mmap_map_size = MMAP_TOTAL_SZ / td->o.nr_files;