X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=fio.h;h=53e174e1b525808674143ef667960de6aad34dbd;hb=c06aa240c904becbafb8457ed3b828cf0d38a180;hp=6a68ec8dc674b0af8b074faba0627ef9940e82ab;hpb=6b9cea23c22c218625b68eca63da38089b299846;p=fio.git diff --git a/fio.h b/fio.h index 6a68ec8d..53e174e1 100644 --- a/fio.h +++ b/fio.h @@ -205,9 +205,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; @@ -364,7 +365,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 +418,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 +458,7 @@ 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); /* * Init functions