From: Jens Axboe Date: Wed, 8 Oct 2014 23:04:29 +0000 (-0600) Subject: net: fix error reported on job exit and full residual X-Git-Tag: fio-2.1.14~81 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f6846c6545e25638ab95676b04e58b7f36993d1c;p=fio.git net: fix error reported on job exit and full residual This is expected, when one end drops off. Signed-off-by: Jens Axboe --- diff --git a/engines/net.c b/engines/net.c index 1d89db1c..61bdfdd1 100644 --- a/engines/net.c +++ b/engines/net.c @@ -515,11 +515,13 @@ static int __fio_netio_queue(struct thread_data *td, struct io_u *io_u, ret = 0; /* must be a SYNC */ if (ret != (int) io_u->xfer_buflen) { - if (ret >= 0) { + if (ret > 0) { io_u->resid = io_u->xfer_buflen - ret; io_u->error = 0; return FIO_Q_COMPLETED; - } else { + } else if (!ret) + return FIO_Q_BUSY; + else { int err = errno; if (ddir == DDIR_WRITE && err == EMSGSIZE)