Lines Matching refs:sd
31 struct spliceio_data *sd = td->io_ops->data; in fio_splice_read_old() local
46 ret = splice(f->fd, &offset, sd->pipe[1], NULL, this_len, SPLICE_F_MORE); in fio_splice_read_old()
57 ret2 = read(sd->pipe[0], p, ret); in fio_splice_read_old()
75 struct spliceio_data *sd = td->io_ops->data; in fio_splice_read() local
86 if (sd->vmsplice_to_user_map) { in fio_splice_read()
108 ret = splice(f->fd, &offset, sd->pipe[1], NULL, this_len,flags); in fio_splice_read()
122 ret = vmsplice(sd->pipe[0], &iov, 1, SPLICE_F_MOVE); in fio_splice_read()
125 sd->vmsplice_to_user_map) { in fio_splice_read()
126 sd->vmsplice_to_user_map = 0; in fio_splice_read()
153 if (sd->vmsplice_to_user_map && munmap(map, mmap_len) < 0) { in fio_splice_read()
169 struct spliceio_data *sd = td->io_ops->data; in fio_splice_write() local
174 struct pollfd pfd = { .fd = sd->pipe[1], .events = POLLOUT, }; in fio_splice_write()
183 ret = vmsplice(sd->pipe[1], &iov, 1, SPLICE_F_NONBLOCK); in fio_splice_write()
191 ret2 = splice(sd->pipe[0], NULL, f->fd, &off, ret, 0); in fio_splice_write()
204 struct spliceio_data *sd = td->io_ops->data; in fio_spliceio_queue() local
210 if (sd->vmsplice_to_user) { in fio_spliceio_queue()
218 sd->vmsplice_to_user = 0; in fio_spliceio_queue()
220 if (!sd->vmsplice_to_user) in fio_spliceio_queue()
250 struct spliceio_data *sd = td->io_ops->data; in fio_spliceio_cleanup() local
252 if (sd) { in fio_spliceio_cleanup()
253 close(sd->pipe[0]); in fio_spliceio_cleanup()
254 close(sd->pipe[1]); in fio_spliceio_cleanup()
255 free(sd); in fio_spliceio_cleanup()
261 struct spliceio_data *sd = malloc(sizeof(*sd)); in fio_spliceio_init() local
263 if (pipe(sd->pipe) < 0) { in fio_spliceio_init()
265 free(sd); in fio_spliceio_init()
272 sd->vmsplice_to_user = 1; in fio_spliceio_init()
278 sd->vmsplice_to_user_map = 1; in fio_spliceio_init()
287 td->io_ops->data = sd; in fio_spliceio_init()