[PATCH] Further improve child exit reaping
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index c0b92a6c6671b3afda65b5fca4499dd6eea71b6c..67cc06529cd8fcab52375b3969bfdc4084ed0584 100644 (file)
--- a/fio.h
+++ b/fio.h
 #include "arch.h"
 #include "os.h"
 
+#ifdef FIO_HAVE_SYSLET
+#include "syslet.h"
+#endif
+
 enum fio_ddir {
        DDIR_READ = 0,
        DDIR_WRITE,
@@ -61,10 +65,17 @@ struct io_piece {
        struct list_head list;
        struct fio_file *file;
        unsigned long long offset;
-       unsigned int len;
+       unsigned long len;
        enum fio_ddir ddir;
 };
 
+#ifdef FIO_HAVE_SYSLET
+struct syslet_req {
+       struct syslet_uatom atom;
+       long ret;
+};
+#endif
+
 /*
  * The io unit
  */
@@ -78,6 +89,9 @@ struct io_u {
 #endif
 #ifdef FIO_HAVE_SGIO
                struct sg_io_hdr hdr;
+#endif
+#ifdef FIO_HAVE_SYSLET
+               struct syslet_req req;
 #endif
        };
        struct timeval start_time;
@@ -87,7 +101,7 @@ struct io_u {
         * Allocated/set buffer and length
         */
        void *buf;
-       unsigned int buflen;
+       unsigned long buflen;
        unsigned long long offset;
 
        /*
@@ -95,7 +109,7 @@ struct io_u {
         * partial transfers / residual data counts
         */
        void *xfer_buf;
-       unsigned int xfer_buflen;
+       unsigned long xfer_buflen;
 
        unsigned int resid;
        unsigned int error;
@@ -206,6 +220,7 @@ struct fio_file {
  * How many depth levels to log
  */
 #define FIO_IO_U_MAP_NR        8
+#define FIO_IO_U_LAT_NR 12
 
 /*
  * This describes a single thread/process executing a fio job.
@@ -306,6 +321,7 @@ struct thread_data {
         */
        unsigned int cur_depth;
        unsigned int io_u_map[FIO_IO_U_MAP_NR];
+       unsigned int io_u_lat[FIO_IO_U_LAT_NR];
        unsigned long total_io_u;
        struct list_head io_u_freelist;
        struct list_head io_u_busylist;
@@ -672,9 +688,11 @@ extern void close_ioengine(struct thread_data *);
 
 #define fio_assert(td, cond)   do {    \
        if (!(cond)) {                  \
+               int *__foo = NULL;      \
                fprintf(stderr, "file:%s:%d, assert %s failed\n", __FILE__, __LINE__, #cond);   \
                (td)->runstate = TD_EXITED;     \
-               exit(0);                        \
+               (td)->error = EFAULT;           \
+               *__foo = 0;                     \
        }       \
 } while (0)