X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio.h;h=2e43473f0ab5ba34d45e35e7c45cbd17086358be;hp=5177795c32c7b05d852c79e154411e7e281a6db8;hb=10927316a4bd0e2ceba98e62c062e352c0e312fe;hpb=81887d5dcd608492e59ed3fb2ac8fcb463223120 diff --git a/fio.h b/fio.h index 5177795c..2e43473f 100644 --- a/fio.h +++ b/fio.h @@ -13,6 +13,7 @@ #include #include #include +#include #include "compiler/compiler.h" #include "list.h" @@ -277,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 { @@ -520,6 +522,7 @@ struct thread_data { volatile int terminate; volatile int runstate; unsigned int ioprio; + unsigned int ioprio_set; unsigned int last_was_sync; char *mmapfile; @@ -628,6 +631,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. @@ -661,6 +673,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; @@ -669,6 +683,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) @@ -758,8 +777,8 @@ extern void add_agg_sample(unsigned long, enum fio_ddir); /* * Time functions */ -extern unsigned long utime_since(struct timeval *, struct timeval *); -extern unsigned long utime_since_now(struct timeval *); +extern unsigned long long utime_since(struct timeval *, struct timeval *); +extern unsigned long long utime_since_now(struct timeval *); extern unsigned long mtime_since(struct timeval *, struct timeval *); extern unsigned long mtime_since_now(struct timeval *); extern unsigned long time_since_now(struct timeval *);