unsigned int blocks = 0;
while (blocks < (io_u->buflen / td->min_bs)) {
- int idx, bit;
+ unsigned int idx, bit;
if (!random_map_free(td, block))
break;
return buflen;
}
-static inline void add_stat_sample(struct thread_data *td, struct io_stat *is,
- unsigned long val)
+static inline void add_stat_sample(struct io_stat *is, unsigned long val)
{
if (val > is->max_val)
is->max_val = val;
static void add_clat_sample(struct thread_data *td, unsigned long msec)
{
- add_stat_sample(td, &td->clat_stat, msec);
+ add_stat_sample(&td->clat_stat, msec);
if (td->lat_log)
add_log_sample(td, td->lat_log, msec);
static void add_slat_sample(struct thread_data *td, unsigned long msec)
{
- add_stat_sample(td, &td->slat_stat, msec);
+ add_stat_sample(&td->slat_stat, msec);
}
static void add_bw_sample(struct thread_data *td)
return;
rate = (td->this_io_bytes - td->stat_io_bytes) / spent;
- add_stat_sample(td, &td->bw_stat, rate);
+ add_stat_sample(&td->bw_stat, rate);
if (td->bw_log)
add_log_sample(td, td->bw_log, rate);
/*
* busy looping version for the last few usec
*/
-static void __usec_sleep(int usec)
+static void __usec_sleep(unsigned int usec)
{
struct timeval start;
static int check_dev_match(dev_t dev, char *path)
{
- int major, minor;
+ unsigned int major, minor;
char line[256], *p;
FILE *f;
printf(" cpu : usr=%3.2f%%, sys=%3.2f%%, ctx=%lu\n", usr_cpu, sys_cpu, td->ctx);
}
-static void print_thread_status(struct thread_data *td, int nr_running,
- int t_rate, int m_rate)
+static void print_thread_status(int nr_running, int t_rate, int m_rate)
{
printf("Threads now running: %d", nr_running);
if (m_rate || t_rate)
}
run_str[td->thread_number - 1] = c;
- print_thread_status(td, n, t, m);
+ print_thread_status(n, t, m);
td->old_runstate = td->runstate;
}
}
}
-static void run_threads(char *argv[])
+static void run_threads(void)
{
struct timeval genesis;
struct thread_data *td;
disk_util_timer_arm();
- run_threads(argv);
+ run_threads();
show_run_stats();
return 0;