static int def_timeout = DEF_TIMEOUT;
-static char fio_version_string[] = "fio 1.7";
+static char fio_version_string[] = "fio 1.9";
static char **ini_file;
static int max_jobs = MAX_JOBS;
struct thread_data def_thread;
struct thread_data *threads = NULL;
-int rate_quit = 0;
int exitall_on_terminate = 0;
int terse_output = 0;
unsigned long long mlock_size = 0;
static char *to_kmg(unsigned int val)
{
char *buf = malloc(32);
- char post[] = { 0, 'K', 'G', 'P', -1 };
+ char post[] = { 0, 'K', 'M', 'G', 'P', 0 };
char *p = post;
- while (*p != -1) {
+ do {
if (val & 1023)
break;
val >>= 10;
p++;
- }
+ } while (*p);
snprintf(buf, 31, "%u%c", val, *p);
return buf;
*/
static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
{
- char *ddir_str[] = { "read", "write", "randread", "randwrite",
- "rw", NULL, "randrw" };
+ const char *ddir_str[] = { "read", "write", "randread", "randwrite",
+ "rw", NULL, "randrw" };
struct stat sb;
int numjobs, ddir, i;
struct fio_file *f;
return 0;
log_err("fio: ioengine: { linuxaio, aio, libaio }, posixaio, sync, mmap, sgio, splice, cpu\n");
+ log_err("fio: or specify path to dynamic ioengine module\n");
return 1;
}