X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;ds=sidebyside;f=fio.h;h=208f742889753c572880b89948fe9f63c572a202;hb=1f809d151ddc4a4c348c2e4f6007db510e3e08a2;hp=fe314bfde1eebd1e18ed6178103ce33ec9ff5f3d;hpb=061c86982ea02651cab2239b12983dd382019f26;p=fio.git diff --git a/fio.h b/fio.h index fe314bfd..208f7428 100644 --- a/fio.h +++ b/fio.h @@ -13,6 +13,7 @@ #include #include #include +#include #include "compiler/compiler.h" #include "list.h" @@ -175,11 +176,6 @@ struct io_u { * Callback for io completion */ int (*end_io)(struct thread_data *, struct io_u *); - - /* - * Called when io_u is about to be freed - */ - void (*unmap)(struct thread_data *, struct io_u *); }; /* @@ -282,6 +278,7 @@ enum fio_ioengine_flags { FIO_NOEXTEND = 1 << 3, /* engine can't extend file */ 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 */ }; enum fio_file_flags { @@ -375,6 +372,7 @@ struct thread_stat { unsigned long usr_time; unsigned long sys_time; unsigned long ctx; + unsigned long minf, majf; /* * IO depth and latency stats @@ -632,6 +630,15 @@ enum { FIO_FSERVICE_RR = 2, }; +/* + * when should interactive ETA output be generated + */ +enum { + FIO_ETA_AUTO, + FIO_ETA_ALWAYS, + FIO_ETA_NEVER, +}; + /* * 30 second per-io_u timeout, with 5 second intervals to avoid resetting * the timer on each queue operation. @@ -665,6 +672,8 @@ extern FILE *f_err; extern int temp_stall_ts; extern unsigned long long mlock_size; extern unsigned long page_mask, page_size; +extern int read_only; +extern int eta_print; extern struct thread_data *threads; @@ -673,6 +682,11 @@ extern struct thread_data *threads; #define td_rw(td) (((td)->o.td_ddir & TD_DDIR_RW) == TD_DDIR_RW) #define td_random(td) ((td)->o.td_ddir & TD_DDIR_RAND) +static inline void fio_ro_check(struct thread_data *td, struct io_u *io_u) +{ + assert(!(io_u->ddir == DDIR_WRITE && !td_write(td))); +} + #define BLOCKS_PER_MAP (8 * sizeof(long)) #define TO_MAP_BLOCK(td, f, b) ((b) - ((f)->file_offset / (td)->o.rw_min_bs)) #define RAND_MAP_IDX(td, f, b) (TO_MAP_BLOCK(td, f, b) / BLOCKS_PER_MAP)