Lines Matching refs:io_u

25 	struct io_u **events;
34 struct io_u *io_u, int fs)
36 struct sgio_cmd *sc = &sd->cmds[io_u->index];
44 hdr->pack_id = io_u->index;
45 hdr->usr_ptr = io_u;
48 hdr->dxferp = io_u->xfer_buf;
49 hdr->dxfer_len = io_u->xfer_buflen;
161 struct fio_file *f, struct io_u *io_u)
164 struct sg_io_hdr *hdr = &io_u->hdr;
167 sd->events[0] = io_u;
176 static int fio_sgio_rw_doio(struct fio_file *f, struct io_u *io_u, int do_sync)
178 struct sg_io_hdr *hdr = &io_u->hdr;
195 static int fio_sgio_doio(struct thread_data *td, struct io_u *io_u, int do_sync)
197 struct fio_file *f = io_u->file;
200 return fio_sgio_ioctl_doio(td, f, io_u);
202 return fio_sgio_rw_doio(f, io_u, do_sync);
205 static int fio_sgio_prep(struct thread_data *td, struct io_u *io_u)
207 struct sg_io_hdr *hdr = &io_u->hdr;
211 if (io_u->xfer_buflen & (sd->bs - 1)) {
216 if (io_u->ddir == DDIR_READ) {
217 sgio_hdr_init(sd, hdr, io_u, 1);
221 } else if (io_u->ddir == DDIR_WRITE) {
222 sgio_hdr_init(sd, hdr, io_u, 1);
227 sgio_hdr_init(sd, hdr, io_u, 0);
234 nr_blocks = io_u->xfer_buflen / sd->bs;
235 lba = io_u->offset / sd->bs;
247 static int fio_sgio_queue(struct thread_data *td, struct io_u *io_u)
249 struct sg_io_hdr *hdr = &io_u->hdr;
252 fio_ro_check(td, io_u);
254 if (td->o.sync_io || td->o.odirect || ddir_sync(io_u->ddir))
257 ret = fio_sgio_doio(td, io_u, do_sync);
260 io_u->error = errno;
262 io_u->resid = hdr->resid;
263 io_u->error = EIO;
266 if (io_u->error) {
267 td_verror(td, io_u->error, "xfer");
274 static struct io_u *fio_sgio_event(struct thread_data *td, int event)
284 struct io_u io_u;
289 memset(&io_u, 0, sizeof(io_u));
290 io_u.file = td->files[0];
292 hdr = &io_u.hdr;
293 sgio_hdr_init(sd, hdr, &io_u, 0);
301 ret = fio_sgio_doio(td, &io_u, 1);
331 sd->events = malloc(td->o.iodepth * sizeof(struct io_u *));
332 memset(sd->events, 0, td->o.iodepth * sizeof(struct io_u *));