X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio.h;h=d8e3011bb4f19a17eb3b542d16af0a693e995ee9;hp=95988584c037bfec4d1da5a2170cc8c295611205;hb=d392365ee61ecf469963ca0dffe06d604332d7d2;hpb=ecc314ba7c5f02b7e90ac1dfbce1a74cd4e6d6fe diff --git a/fio.h b/fio.h index 95988584..d8e3011b 100644 --- a/fio.h +++ b/fio.h @@ -34,6 +34,7 @@ struct thread_data; #include "profile.h" #include "time.h" #include "lib/getopt.h" +#include "lib/rand.h" #ifdef FIO_HAVE_GUASI #include @@ -164,6 +165,7 @@ struct thread_options { unsigned int iodepth_batch_complete; unsigned long long size; + unsigned int size_percent; unsigned int fill_device; unsigned long long file_size_low; unsigned long long file_size_high; @@ -197,6 +199,7 @@ struct thread_options { char verify_pattern[MAX_PATTERN_SIZE]; unsigned int verify_pattern_bytes; unsigned int verify_fatal; + unsigned int verify_dump; unsigned int verify_async; unsigned long long verify_backlog; unsigned int verify_batch; @@ -205,6 +208,7 @@ struct thread_options { unsigned int do_disk_util; unsigned int override_sync; unsigned int rand_repeatable; + unsigned int use_os_rand; unsigned int write_lat_log; unsigned int write_bw_log; unsigned int norandommap; @@ -220,7 +224,7 @@ struct thread_options { unsigned int fsync_blocks; unsigned int fdatasync_blocks; unsigned int barrier_blocks; - unsigned long start_delay; + unsigned long long start_delay; unsigned long long timeout; unsigned long long ramp_time; unsigned int overwrite; @@ -245,7 +249,7 @@ struct thread_options { unsigned int file_service_type; unsigned int group_reporting; unsigned int fadvise_hint; - unsigned int fallocate; + enum fio_fallocate_mode fallocate_mode; unsigned int zero_buffers; unsigned int refill_buffers; unsigned int time_based; @@ -333,6 +337,7 @@ struct thread_data { union { unsigned int next_file; os_random_state_t next_file_state; + struct frand_state __next_file_state; }; int error; int done; @@ -356,9 +361,18 @@ struct thread_data { unsigned long rand_seeds[7]; - os_random_state_t bsrange_state; - os_random_state_t verify_state; - os_random_state_t trim_state; + union { + os_random_state_t bsrange_state; + struct frand_state __bsrange_state; + }; + union { + os_random_state_t verify_state; + struct frand_state __verify_state; + }; + union { + os_random_state_t trim_state; + struct frand_state __trim_state; + }; unsigned int verify_batch; unsigned int trim_batch; @@ -414,7 +428,10 @@ struct thread_data { /* * State for random io, a bitmap of blocks done vs not done */ - os_random_state_t random_state; + union { + os_random_state_t random_state; + struct frand_state __random_state; + }; struct timeval start; /* start of this loop */ struct timeval epoch; /* time job was started */ @@ -427,7 +444,10 @@ struct thread_data { /* * read/write mixed workload state */ - os_random_state_t rwmix_state; + union { + os_random_state_t rwmix_state; + struct frand_state __rwmix_state; + }; unsigned long rwmix_issues; enum fio_ddir rwmix_ddir; unsigned int ddir_seq_nr; @@ -463,7 +483,10 @@ struct thread_data { /* * For generating file sizes */ - os_random_state_t file_size_state; + union { + os_random_state_t file_size_state; + struct frand_state __file_size_state; + }; /* * Error counts @@ -521,6 +544,7 @@ extern char *job_section; extern int fio_gtod_offload; extern int fio_gtod_cpu; extern enum fio_cs fio_clock_source; +extern int warnings_fatal; extern struct thread_data *threads; @@ -529,12 +553,12 @@ 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(int)) +#define BLOCKS_PER_MAP (8 * sizeof(unsigned long)) #define TO_MAP_BLOCK(f, b) (b) #define RAND_MAP_IDX(f, b) (TO_MAP_BLOCK(f, b) / BLOCKS_PER_MAP) #define RAND_MAP_BIT(f, b) (TO_MAP_BLOCK(f, b) & (BLOCKS_PER_MAP - 1)) -#define MAX_JOBS (1024) +#define REAL_MAX_JOBS 2048 #define td_non_fatal_error(e) ((e) == EIO || (e) == EILSEQ) @@ -643,7 +667,7 @@ extern int load_blktrace(struct thread_data *, const char *); if (!(cond)) { \ int *__foo = NULL; \ fprintf(stderr, "file:%s:%d, assert %s failed\n", __FILE__, __LINE__, #cond); \ - (td)->runstate = TD_EXITED; \ + td_set_runstate((td), TD_EXITED); \ (td)->error = EFAULT; \ *__foo = 0; \ } \