X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio.h;h=434c34b237ed718cb1c8312fc77629281d35c39f;hp=6a68ec8dc674b0af8b074faba0627ef9940e82ab;hb=3c9b60c1fb144950ca51220ffa18f485672c3ba6;hpb=6b9cea23c22c218625b68eca63da38089b299846 diff --git a/fio.h b/fio.h index 6a68ec8d..434c34b2 100644 --- a/fio.h +++ b/fio.h @@ -10,6 +10,7 @@ #include #include #include +#include #include "list.h" #include "md5.h" @@ -205,9 +206,10 @@ struct thread_data { unsigned int norandommap; unsigned int bs_unaligned; - unsigned int bs; - unsigned int min_bs; - unsigned int max_bs; + unsigned int bs[2]; + unsigned int min_bs[2]; + unsigned int max_bs[2]; + unsigned int rw_min_bs; unsigned int thinktime; unsigned int fsync_blocks; unsigned int start_delay; @@ -354,7 +356,7 @@ extern int groupid; extern int terse_output; extern FILE *f_out; extern FILE *f_err; -extern char *fio_inst_prefix; +extern const char *fio_inst_prefix; extern int temp_stall_ts; extern struct thread_data *threads; @@ -364,7 +366,7 @@ extern struct thread_data *threads; #define td_rw(td) ((td)->iomix != 0) #define BLOCKS_PER_MAP (8 * sizeof(long)) -#define TO_MAP_BLOCK(td, f, b) ((b) - ((f)->file_offset / (td)->min_bs)) +#define TO_MAP_BLOCK(td, f, b) ((b) - ((f)->file_offset / (td)->rw_min_bs)) #define RAND_MAP_IDX(td, f, b) (TO_MAP_BLOCK(td, f, b) / BLOCKS_PER_MAP) #define RAND_MAP_BIT(td, f, b) (TO_MAP_BLOCK(td, f, b) & (BLOCKS_PER_MAP - 1)) @@ -417,6 +419,9 @@ struct io_completion_data { #ifndef min #define min(a, b) ((a) < (b) ? (a) : (b)) #endif +#ifndef max +#define max(a, b) ((a) > (b) ? (a) : (b)) +#endif /* * Log exports @@ -454,7 +459,8 @@ extern unsigned long time_since_now(struct timeval *); extern unsigned long mtime_since_genesis(void); extern void __usec_sleep(unsigned int); extern void usec_sleep(struct thread_data *, unsigned long); -extern void rate_throttle(struct thread_data *, unsigned long, unsigned int); +extern void rate_throttle(struct thread_data *, unsigned long, unsigned int, int); +extern void fill_start_time(struct timeval *); /* * Init functions