From f657a2fbbb0deaf455edc478d73b664929bcb766 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 22 Jun 2007 20:40:10 +0200 Subject: [PATCH] netsplice: fix a few typos It actually works now. Signed-off-by: Jens Axboe --- engines/net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/net.c b/engines/net.c index 4936cc24..a67432bf 100644 --- a/engines/net.c +++ b/engines/net.c @@ -63,7 +63,7 @@ static int splice_in(struct thread_data *td, struct io_u *io_u) int bytes = 0; while (len) { - int ret = splice(nd->pipes[1], NULL, f->fd, NULL, len, 0); + int ret = splice(f->fd, NULL, nd->pipes[1], NULL, len, 0); if (ret < 0) { if (!bytes) @@ -74,6 +74,7 @@ static int splice_in(struct thread_data *td, struct io_u *io_u) break; bytes += ret; + len -= ret; } return bytes; @@ -131,6 +132,7 @@ static int vmsplice_io_u_out(struct thread_data *td, struct io_u *io_u, break; iov.iov_len -= ret; + bytes += ret; if (iov.iov_len) iov.iov_base += ret; } -- 2.25.1