#include "profile.h"
#include "time.h"
#include "lib/getopt.h"
+#include "lib/rand.h"
#ifdef FIO_HAVE_GUASI
#include <guasi.h>
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;
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;
union {
unsigned int next_file;
os_random_state_t next_file_state;
+ struct frand_state __next_file_state;
};
int error;
int done;
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;
/*
* 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 */
/*
* 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;
/*
* 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
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;
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 MAX_JOBS (2048)
#define td_non_fatal_error(e) ((e) == EIO || (e) == EILSEQ)
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; \
} \