Home | History | Annotate | Download | only in engines

Lines Matching refs:sd

77 	struct syncio_data *sd = td->io_ops->data;
78 struct iovec *iov = &sd->iovecs[0];
145 struct syncio_data *sd = td->io_ops->data;
149 ret = sd->events;
150 sd->events = 0;
160 struct syncio_data *sd = td->io_ops->data;
162 return sd->io_us[event];
167 struct syncio_data *sd = td->io_ops->data;
172 if (io_u->offset == sd->last_offset && io_u->file == sd->last_file &&
173 io_u->ddir == sd->last_ddir)
179 static void fio_vsyncio_set_iov(struct syncio_data *sd, struct io_u *io_u,
182 sd->io_us[idx] = io_u;
183 sd->iovecs[idx].iov_base = io_u->xfer_buf;
184 sd->iovecs[idx].iov_len = io_u->xfer_buflen;
185 sd->last_offset = io_u->offset + io_u->xfer_buflen;
186 sd->last_file = io_u->file;
187 sd->last_ddir = io_u->ddir;
188 sd->queued_bytes += io_u->xfer_buflen;
189 sd->queued++;
194 struct syncio_data *sd = td->io_ops->data;
199 dprint(FD_IO, "vsyncio_queue: no append (%d)\n", sd->queued);
204 if (sd->queued)
212 sd->queued = 0;
213 sd->queued_bytes = 0;
214 fio_vsyncio_set_iov(sd, io_u, 0);
216 if (sd->queued == td->o.iodepth) {
217 dprint(FD_IO, "vsyncio_queue: max depth %d\n", sd->queued);
222 fio_vsyncio_set_iov(sd, io_u, sd->queued);
225 dprint(FD_IO, "vsyncio_queue: depth now %d\n", sd->queued);
234 struct syncio_data *sd = td->io_ops->data;
242 if (bytes == sd->queued_bytes)
246 for (i = 0; i < sd->queued; i++) {
247 io_u = sd->io_us[i];
274 struct syncio_data *sd = td->io_ops->data;
278 if (!sd->queued)
281 io_u_mark_submit(td, sd->queued);
282 f = sd->last_file;
284 if (lseek(f->fd, sd->io_us[0]->offset, SEEK_SET) == -1) {
291 if (sd->last_ddir == DDIR_READ)
292 ret = readv(f->fd, sd->iovecs, sd->queued);
294 ret = writev(f->fd, sd->iovecs, sd->queued);
297 sd->events = sd->queued;
298 sd->queued = 0;
304 struct syncio_data *sd;
306 sd = malloc(sizeof(*sd));
307 memset(sd, 0, sizeof(*sd));
308 sd->last_offset = -1ULL;
309 sd->iovecs = malloc(td->o.iodepth * sizeof(struct iovec));
310 sd->io_us = malloc(td->o.iodepth * sizeof(struct io_u *));
312 td->io_ops->data = sd;
318 struct syncio_data *sd = td->io_ops->data;
320 free(sd->iovecs);
321 free(sd->io_us);
322 free(sd);