Still need to put io_u on early exit
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index e6931619f64373abd06c9792d227d3549baef851..aeb45bf73611bd718ae0cfd89294b04c600e9fb6 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -425,6 +425,8 @@ struct thread_data {
 
 #define __td_verror(td, err, msg)                                      \
        do {                                                            \
+               if ((td)->error)                                        \
+                       break;                                          \
                int e = (err);                                          \
                (td)->error = e;                                        \
                snprintf(td->verror, sizeof(td->verror) - 1, "file:%s:%d, error=%s", __FILE__, __LINE__, (msg));        \
@@ -515,9 +517,9 @@ typedef int (endio_handler)(struct io_u *);
 /*
  * Log exports
  */
-extern int read_iolog_get(struct thread_data *, struct io_u *);
+extern int __must_check read_iolog_get(struct thread_data *, struct io_u *);
 extern void write_iolog_put(struct thread_data *, struct io_u *);
-extern int init_iolog(struct thread_data *td);
+extern int __must_check init_iolog(struct thread_data *td);
 extern void log_io_piece(struct thread_data *, struct io_u *);
 extern void prune_io_piece_log(struct thread_data *);
 extern void write_iolog_close(struct thread_data *);
@@ -559,8 +561,8 @@ extern void fio_gettime(struct timeval *, void *);
 /*
  * Init functions
  */
-extern int parse_options(int, char **);
-extern int init_random_state(struct thread_data *);
+extern int __must_check parse_options(int, char **);
+extern int __must_check init_random_state(struct thread_data *);
 
 /*
  * File setup/shutdown