[PATCH] Fix random seed for numjobs > 1
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index c0b92a6c6671b3afda65b5fca4499dd6eea71b6c..5fad44648e6a95d071904bd4e1dabb2d3bf43076 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;
@@ -182,7 +196,7 @@ struct fio_file {
         */
        union {
                unsigned long file_data;
-               int fd;
+               long fd;
        };
        char *file_name;
        void *mmap;
@@ -672,9 +686,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)