FIO_RAND_SEQ_RAND_WRITE_OFF,
FIO_RAND_SEQ_RAND_TRIM_OFF,
FIO_RAND_START_DELAY,
+ FIO_DEDUPE_OFF,
FIO_RAND_NR_OFFS,
};
char verror[FIO_VERROR_SIZE];
pthread_t thread;
unsigned int thread_number;
+ unsigned int subjob_number;
unsigned int groupid;
struct thread_stat ts;
unsigned int nr_normal_files;
union {
unsigned int next_file;
- os_random_state_t next_file_state;
- struct frand_state __next_file_state;
+ struct frand_state next_file_state;
};
int error;
int sig;
unsigned long rand_seeds[FIO_RAND_NR_OFFS];
- 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;
- };
- union {
- os_random_state_t delay_state;
- struct frand_state __delay_state;
- };
+ struct frand_state bsrange_state;
+ struct frand_state verify_state;
+ struct frand_state trim_state;
+ struct frand_state delay_state;
struct frand_state buf_state;
+ struct frand_state buf_state_prev;
+ struct frand_state dedupe_state;
unsigned int verify_batch;
unsigned int trim_batch;
/*
* State for random io, a bitmap of blocks done vs not done
*/
- union {
- os_random_state_t random_state;
- struct frand_state __random_state;
- };
+ struct frand_state random_state;
struct timeval start; /* start of this loop */
struct timeval epoch; /* time job was started */
/*
* read/write mixed workload state
*/
- union {
- os_random_state_t rwmix_state;
- struct frand_state __rwmix_state;
- };
+ struct frand_state rwmix_state;
unsigned long rwmix_issues;
enum fio_ddir rwmix_ddir;
unsigned int ddir_seq_nr;
/*
* rand/seq mixed workload state
*/
- union {
- os_random_state_t seq_rand_state[DDIR_RWDIR_CNT];
- struct frand_state __seq_rand_state[DDIR_RWDIR_CNT];
- };
+ struct frand_state seq_rand_state[DDIR_RWDIR_CNT];
/*
* IO history logs for verification. We use a tree for sorting,
/*
* For generating file sizes
*/
- union {
- os_random_state_t file_size_state;
- struct frand_state __file_size_state;
- };
+ struct frand_state file_size_state;
/*
* Error counts
extern int log_syslog;
extern int status_interval;
extern const char fio_version_string[];
+extern int helper_do_stat;
+extern pthread_cond_t helper_cond;
extern struct thread_data *threads;
-static inline void fio_ro_check(struct thread_data *td, struct io_u *io_u)
+static inline void fio_ro_check(const struct thread_data *td, struct io_u *io_u)
{
assert(!(io_u->ddir == DDIR_WRITE && !td_write(td)));
}
#define TERMINATE_ALL (-1)
extern void fio_terminate_threads(int);
+extern void fio_mark_td_terminate(struct thread_data *);
/*
* Memory helpers