#define DEF_ZONE_SKIP (0)
#define DEF_RWMIX_CYCLE (500)
#define DEF_RWMIX_READ (50)
+#define DEF_NICE (0)
static char fio_version_string[] = "fio 1.3";
static int check_str(char *p, char *name, str_cb_fn *cb, struct thread_data *td)
{
- char *s = strstr(p, name);
+ char *s;
+ if (strncmp(p, name, strlen(name)))
+ return 1;
+
+ s = strstr(p, name);
if (!s)
return 1;
static int check_strstore(char *p, char *name, char *dest)
{
- char *s = strstr(p, name);
+ char *s;
+
+ if (strncmp(p, name, strlen(name)))
+ return 1;
+ s = strstr(p, name);
if (!s)
return 1;
char option[128];
char *str, *p1, *p2;
+ if (strncmp(p, name, strlen(name)))
+ return 1;
+
strcpy(option, p);
p = option;
static int str_iolog_cb(struct thread_data *td, char *file)
{
strncpy(td->iolog_file, file, sizeof(td->iolog_file) - 1);
-
return 0;
}
fgetpos(f, &off);
continue;
}
+ if (!check_int(p, "nice", &td->nice)) {
+ fgetpos(f, &off);
+ continue;
+ }
if (!check_range(p, "bsrange", &ul1, &ul2)) {
if (ul1 > ul2) {
td->max_bs = ul1;
continue;
}
if (!check_str(p, "iolog", str_iolog_cb, td)) {
- td->iolog = 1;
+ printf("got read iolog\n");
+ td->read_iolog = 1;
+ td->write_iolog = 0;
+ fgetpos(f, &off);
+ continue;
+ }
+ if (!td->read_iolog &&
+ !check_str(p, "write_iolog", str_iolog_cb, td)) {
+ printf("got write iolog\n");
+ td->write_iolog = 1;
fgetpos(f, &off);
continue;
}
def_thread.use_thread = DEF_USE_THREAD;
def_thread.rwmixcycle = DEF_RWMIX_CYCLE;
def_thread.rwmixread = DEF_RWMIX_READ;
+ def_thread.nice = DEF_NICE;
#ifdef FIO_HAVE_DISK_UTIL
def_thread.do_disk_util = 1;
#endif