Fix splice engine compile
authorJens Axboe <jens.axboe@oracle.com>
Wed, 5 Sep 2007 16:10:11 +0000 (18:10 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 5 Sep 2007 16:10:11 +0000 (18:10 +0200)
We need to move the splice_unmap_io_u() function.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
engines/splice.c

index d8080b42ff71460b8a340dd858da795f5a8511a6..1cce513bd205035442d06c0ff7695fc275f2394b 100644 (file)
@@ -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;