X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=28061db8ea8f9a51d8e884c317ee3fc4309e11b1;hp=ae3c4f74c9dbf86bd61e4c1da3565a9a1544cbad;hb=5ec3bc5401f354444bdc0ce3c240df664f50d520;hpb=7f3ecee2f6dd2aa40c0404a40d0406d9efc765f2 diff --git a/init.c b/init.c index ae3c4f74..28061db8 100644 --- a/init.c +++ b/init.c @@ -79,6 +79,7 @@ static int prev_group_jobs; unsigned long fio_debug = 0; unsigned int fio_debug_jobno = -1; unsigned int *fio_debug_jobp = NULL; +unsigned int *fio_warned = NULL; static char cmd_optstr[256]; static bool did_arg; @@ -309,6 +310,7 @@ static void free_shm(void) if (threads) { flow_exit(); fio_debug_jobp = NULL; + fio_warned = NULL; free_threads_shm(); } @@ -341,7 +343,7 @@ static int setup_thread_area(void) do { size_t size = max_jobs * sizeof(struct thread_data); - size += sizeof(unsigned int); + size += 2 * sizeof(unsigned int); #ifndef CONFIG_NO_SHM shm_id = shmget(0, size, IPC_CREAT | 0600); @@ -376,6 +378,8 @@ static int setup_thread_area(void) memset(threads, 0, max_jobs * sizeof(struct thread_data)); fio_debug_jobp = (unsigned int *)(threads + max_jobs); *fio_debug_jobp = -1; + fio_warned = fio_debug_jobp + 1; + *fio_warned = 0; flow_init(); @@ -802,11 +806,12 @@ static int fixup_options(struct thread_data *td) o->verify_interval = o->min_bs[DDIR_READ]; /* - * Verify interval must be a factor or both min and max + * Verify interval must be a factor of both min and max * write size */ - if (o->verify_interval % o->min_bs[DDIR_WRITE] || - o->verify_interval % o->max_bs[DDIR_WRITE]) + if (!o->verify_interval || + (o->min_bs[DDIR_WRITE] % o->verify_interval) || + (o->max_bs[DDIR_WRITE] % o->verify_interval)) o->verify_interval = gcd(o->min_bs[DDIR_WRITE], o->max_bs[DDIR_WRITE]); } @@ -1585,7 +1590,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, p.avg_msec = min(o->log_avg_msec, o->bw_avg_time); else o->bw_avg_time = p.avg_msec; - + p.hist_msec = o->log_hist_msec; p.hist_coarseness = o->log_hist_coarseness; @@ -1616,7 +1621,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, p.avg_msec = min(o->log_avg_msec, o->iops_avg_time); else o->iops_avg_time = p.avg_msec; - + p.hist_msec = o->log_hist_msec; p.hist_coarseness = o->log_hist_coarseness;