- if (!check_int(p, "prio", &prio)) {
-#ifndef FIO_HAVE_IOPRIO
- fprintf(stderr, "io priorities not available\n");
- ret = 1;
- break;
-#endif
- td->ioprio |= prio;
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "prioclass", &prioclass)) {
-#ifndef FIO_HAVE_IOPRIO
- fprintf(stderr, "io priorities not available\n");
- ret = 1;
- break;
-#endif
- td->ioprio |= prioclass << IOPRIO_CLASS_SHIFT;
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "direct", &td->odirect)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "rate", &td->rate)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "ratemin", &td->ratemin)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "ratecycle", &td->ratecycle)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "thinktime", &td->thinktime)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "cpumask", &cpu)) {
-#ifndef FIO_HAVE_CPU_AFFINITY
- fprintf(stderr, "cpu affinity not available\n");
- ret = 1;
- break;
-#endif
- fill_cpu_mask(td->cpumask, cpu);
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "fsync", &td->fsync_blocks)) {
- fgetpos(f, &off);
- td->end_fsync = 1;
- continue;
- }
- if (!check_int(p, "startdelay", &td->start_delay)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "timeout", &td->timeout)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "invalidate",&td->invalidate_cache)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "iodepth", &td->iodepth)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "sync", &td->sync_io)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "bwavgtime", &td->bw_avg_time)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "create_serialize", &td->create_serialize)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "create_fsync", &td->create_fsync)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "end_fsync", &td->end_fsync)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "loops", &td->loops)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "numjobs", &td->numjobs)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "overwrite", &td->overwrite)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "rwmixcycle", &td->rwmixcycle)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "rwmixread", &il)) {
- if (il > 100)
- il = 100;
- td->rwmixread = il;
- fgetpos(f, &off);
- continue;
- }
- if (!check_int(p, "rwmixwrite", &il)) {
- if (il > 100)
- il = 100;
- td->rwmixread = 100 - il;
- 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;
- td->min_bs = ul2;
- } else {
- td->max_bs = ul2;
- td->min_bs = ul1;
- }
- fgetpos(f, &off);
- continue;
- }
- if (!check_strcnv(p, "bs", &ull)) {
- td->bs = ull;
- fgetpos(f, &off);
- continue;
- }
- if (!check_strcnv(p, "size", &td->file_size)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_strcnv(p, "offset", &td->file_offset)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_strcnv(p, "zonesize", &td->zone_size)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_strcnv(p, "zoneskip", &td->zone_skip)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_strcnv(p, "lockmem", &mlock_size)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_strstore(p, "directory", tmpbuf)) {
- td->directory = strdup(tmpbuf);
- fgetpos(f, &off);
- continue;
- }
- if (!check_strstore(p, "name", tmpbuf)) {
- snprintf(td->name, sizeof(td->name)-1, "%s%d", tmpbuf, td->thread_number);
- fgetpos(f, &off);
- continue;
- }
- if (!check_str(p, "mem", str_mem_cb, td)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_str(p, "verify", str_verify_cb, td)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_str(p, "rw", str_rw_cb, td)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_str(p, "ioengine", str_ioengine_cb, td)) {
- fgetpos(f, &off);
- continue;
- }
- if (!check_strset(p, "create")) {
- td->create_file = 1;
- fgetpos(f, &off);
- continue;
- }
- if (!check_strset(p, "exitall")) {
- exitall_on_terminate = 1;
- fgetpos(f, &off);
- continue;
- }
- if (!check_strset(p, "stonewall")) {
- td->stonewall = 1;
- fgetpos(f, &off);
- continue;
- }
- if (!check_strset(p, "thread")) {
- td->use_thread = 1;
- fgetpos(f, &off);
- continue;
- }
- if (!check_strstore(p, "iolog", tmpbuf)) {
- td->iolog_file = strdup(tmpbuf);
- td->read_iolog = 1;
- td->write_iolog = 0;
- fgetpos(f, &off);
- continue;
- }
- if (!td->read_iolog &&
- !check_strstore(p, "write_iolog", tmpbuf)) {
- td->iolog_file = strdup(tmpbuf);
- td->write_iolog = 1;
- fgetpos(f, &off);
- continue;
- }
- if (!check_strstore(p, "exec_prerun", tmpbuf)) {
- td->exec_prerun = strdup(tmpbuf);
- fgetpos(f, &off);
- continue;
- }
- if (!check_strstore(p, "exec_postrun", tmpbuf)) {
- td->exec_postrun = strdup(tmpbuf);
- fgetpos(f, &off);
- continue;
- }
- if (!check_strstore(p, "ioscheduler", tmpbuf)) {
-#ifndef FIO_HAVE_IOSCHED_SWITCH
- fprintf(stderr, "io scheduler switching not available\n");
- ret = 1;