Assign io_u->error directly in do_io_u_sync()
[fio.git] / ioengines.c
index 155649b4007ff765f1277b96c6889286de205d72..366382e1fb2559e84600e788b1f8b03c9ce4af92 100644 (file)
@@ -465,5 +465,8 @@ int do_io_u_sync(struct thread_data *td, struct io_u *io_u)
                io_u->error = EINVAL;
        }
 
+       if (ret < 0)
+               io_u->error = errno;
+
        return ret;
 }