X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio.h;h=53e174e1b525808674143ef667960de6aad34dbd;hp=b30dec59c7244e357fe5371416159b8812575922;hb=a00735e66f9ec42549da94eba3170e543b542904;hpb=690adba373bb8c97a365c67da369e265953c4b4c diff --git a/fio.h b/fio.h index b30dec59..53e174e1 100644 --- a/fio.h +++ b/fio.h @@ -63,7 +63,7 @@ struct io_u { struct timeval start_time; struct timeval issue_time; - char *buf; + void *buf; unsigned int buflen; unsigned long long offset; @@ -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