net: fix error reported on job exit and full residual
authorJens Axboe <axboe@fb.com>
Wed, 8 Oct 2014 23:04:29 +0000 (17:04 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 8 Oct 2014 23:04:29 +0000 (17:04 -0600)
This is expected, when one end drops off.

Signed-off-by: Jens Axboe <axboe@fb.com>
engines/net.c

index 1d89db1cdcecc4a740b1afe603711ea3a114ba0c..61bdfdd19be81a06fe1ae295b7898546f803de39 100644 (file)
@@ -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)