From: Jens Axboe Date: Wed, 5 Sep 2007 16:10:11 +0000 (+0200) Subject: Fix splice engine compile X-Git-Tag: fio-1.17.2~27 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=a26fc7c568964658aa2b98610ebd9054e2477456 Fix splice engine compile We need to move the splice_unmap_io_u() function. Signed-off-by: Jens Axboe --- diff --git a/engines/splice.c b/engines/splice.c index d8080b42..1cce513b 100644 --- a/engines/splice.c +++ b/engines/splice.c @@ -66,6 +66,17 @@ static int fio_splice_read_old(struct thread_data *td, struct io_u *io_u) return io_u->xfer_buflen; } +static void splice_unmap_io_u(struct thread_data *td, struct io_u *io_u) +{ + struct spliceio_data *sd = td->io_ops->data; + struct iovec iov = { + .iov_base = io_u->xfer_buf, + .iov_len = io_u->xfer_buflen, + }; + + vmsplice(sd->pipe[0], &iov, 1, SPLICE_F_UNMAP); +} + /* * We can now vmsplice into userspace, so do the transfer by splicing into * a pipe and vmsplicing that into userspace. @@ -159,17 +170,6 @@ static int fio_splice_write(struct thread_data *td, struct io_u *io_u) return io_u->xfer_buflen; } -static void splice_unmap_io_u(struct thread_data *td, struct io_u *io_u) -{ - struct spliceio_data *sd = td->io_ops->data; - struct iovec iov = { - .iov_base = io_u->xfer_buf, - .iov_len = io_u->xfer_buflen, - }; - - vmsplice(sd->pipe[0], &iov, 1, SPLICE_F_UNMAP); -} - static int fio_spliceio_queue(struct thread_data *td, struct io_u *io_u) { struct spliceio_data *sd = td->io_ops->data;