[PATCH] Move td_verror() into io_ops->queue() hook
[fio.git] / engines / sg.c
index d32007022aeb8388c6e0fcfef0d5f4ee50393acc..8d086bffe6cad7431cd9243932538d735e133cfa 100644 (file)
@@ -261,7 +261,12 @@ static int fio_sgio_queue(struct thread_data *td, struct io_u *io_u)
                io_u->error = EIO;
        }
 
-       return io_u->error;
+       if (io_u->error) {
+               td_verror(td, io_u->error);
+               return io_u->error;
+       }
+
+       return 0;
 }
 
 static struct io_u *fio_sgio_event(struct thread_data *td, int event)