X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=ioengine.h;h=37bf5fce125e0e9e265b9137cf63dc9b0eb406fa;hb=7ffa8930764e6ccc5bf036fe4d73f1d7276453e5;hp=0756bc7e6c1335dc729bbe6c08b9f78630121d66;hpb=363cffa71a96eb4c7595bb8c325a09eb01f766a5;p=fio.git diff --git a/ioengine.h b/ioengine.h index 0756bc7e..37bf5fce 100644 --- a/ioengine.h +++ b/ioengine.h @@ -15,7 +15,7 @@ #include #endif -#define FIO_IOOPS_VERSION 16 +#define FIO_IOOPS_VERSION 19 enum { IO_U_F_FREE = 1 << 0, @@ -71,6 +71,27 @@ struct io_u { */ unsigned long buf_filled_len; + struct io_piece *ipo; + + unsigned int resid; + unsigned int error; + + /* + * io engine private data + */ + union { + unsigned int index; + unsigned int seen; + void *engine_data; + }; + + struct flist_head verify_list; + + /* + * Callback for io completion + */ + int (*end_io)(struct thread_data *, struct io_u *); + union { #ifdef CONFIG_LIBAIO struct iocb iocb; @@ -95,25 +116,6 @@ struct io_u { #endif void *mmap_data; }; - - unsigned int resid; - unsigned int error; - - /* - * io engine private data - */ - union { - unsigned int index; - unsigned int seen; - void *engine_data; - }; - - struct flist_head verify_list; - - /* - * Callback for io completion - */ - int (*end_io)(struct thread_data *, struct io_u *); }; /* @@ -141,6 +143,7 @@ struct ioengine_ops { void (*cleanup)(struct thread_data *); int (*open_file)(struct thread_data *, struct fio_file *); int (*close_file)(struct thread_data *, struct fio_file *); + int (*invalidate)(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 *); @@ -165,6 +168,11 @@ enum fio_ioengine_flags { FIO_BIT_BASED = 1 << 10, /* engine uses a bit base (e.g. uses Kbit as opposed to KB) */ }; +/* + * External engine defined symbol to fill in the engine ops structure + */ +typedef void (*get_ioengine_t)(struct ioengine_ops **); + /* * io engine entry points */