implement get_cpu_clock() for s390/s390x
[fio.git] / ioengine.h
index 61cb396f5e0e792f87b862976a426695338e524b..0285b08c77567aefc1bdfed7a2bf481548a99ed5 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef FIO_IOENGINE_H
 #define FIO_IOENGINE_H
 
-#define FIO_IOOPS_VERSION      13
+#define FIO_IOOPS_VERSION      14
 
 enum {
        IO_U_F_FREE             = 1 << 0,
@@ -45,12 +45,16 @@ struct io_u {
        struct timeval start_time;
        struct timeval issue_time;
 
+       struct fio_file *file;
+       unsigned int flags;
+       enum fio_ddir ddir;
+
        /*
         * Allocated/set buffer and length
         */
-       void *buf;
        unsigned long buflen;
        unsigned long long offset;
+       void *buf;
 
        /*
         * Initial seed for generating the buffer contents
@@ -73,8 +77,6 @@ struct io_u {
        unsigned int resid;
        unsigned int error;
 
-       enum fio_ddir ddir;
-
        /*
         * io engine private data
         */
@@ -84,10 +86,6 @@ struct io_u {
                void *engine_data;
        };
 
-       unsigned int flags;
-
-       struct fio_file *file;
-
        struct flist_head list;
 
        /*
@@ -122,6 +120,9 @@ struct ioengine_ops {
        int (*open_file)(struct thread_data *, struct fio_file *);
        int (*close_file)(struct thread_data *, struct fio_file *);
        int (*get_file_size)(struct thread_data *, struct fio_file *);
+       void (*terminate)(struct thread_data *);
+       int (*io_u_init)(struct thread_data *, struct io_u *);
+       void (*io_u_free)(struct thread_data *, struct io_u *);
        int option_struct_size;
        struct fio_option *options;
        void *data;
@@ -136,10 +137,9 @@ enum fio_ioengine_flags {
        FIO_NODISKUTIL  = 1 << 4,       /* diskutil can't handle filename */
        FIO_UNIDIR      = 1 << 5,       /* engine is uni-directional */
        FIO_NOIO        = 1 << 6,       /* thread does only pseudo IO */
-       FIO_SIGTERM     = 1 << 7,       /* needs SIGTERM to exit */
-       FIO_PIPEIO      = 1 << 8,       /* input/output no seekable */
-       FIO_BARRIER     = 1 << 9,       /* engine supports barriers */
-       FIO_MEMALIGN    = 1 << 10,      /* engine wants aligned memory */
+       FIO_PIPEIO      = 1 << 7,       /* input/output no seekable */
+       FIO_BARRIER     = 1 << 8,       /* engine supports barriers */
+       FIO_MEMALIGN    = 1 << 9,       /* engine wants aligned memory */
 };
 
 /*