#define DEF_WRITE_LAT_LOG (0)
#define DEF_NO_RAND_MAP (0)
#define DEF_HUGEPAGE_SIZE FIO_HUGE_PAGE
+#define DEF_THINKTIME_BLOCKS (1)
#define td_var_offset(var) ((size_t) &((struct thread_data *)0)->var)
{
.name = "thinktime",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(thinktime)
+ .off1 = td_var_offset(thinktime),
+ },
+ {
+ .name = "thinktime_blocks",
+ .type = FIO_OPT_INT,
+ .off1 = td_var_offset(thinktime_blocks),
},
{
.name = "rate",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(rate)
+ .off1 = td_var_offset(rate),
},
{
.name = "ratemin",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(ratemin)
+ .off1 = td_var_offset(ratemin),
},
{
.name = "ratecycle",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(ratecycle)
+ .off1 = td_var_offset(ratecycle),
},
{
.name = "startdelay",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(start_delay)
+ .off1 = td_var_offset(start_delay),
},
{
.name = "timeout",
.type = FIO_OPT_STR_VAL_TIME,
- .off1 = td_var_offset(timeout)
+ .off1 = td_var_offset(timeout),
},
{
.name = "invalidate",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(invalidate_cache)
+ .off1 = td_var_offset(invalidate_cache),
},
{
.name = "sync",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(sync_io)
+ .off1 = td_var_offset(sync_io),
},
{
.name = "bwavgtime",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(bw_avg_time)
+ .off1 = td_var_offset(bw_avg_time),
},
{
.name = "create_serialize",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(create_serialize)
+ .off1 = td_var_offset(create_serialize),
},
{
.name = "create_fsync",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(create_fsync)
+ .off1 = td_var_offset(create_fsync),
},
{
.name = "loops",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(loops)
+ .off1 = td_var_offset(loops),
},
{
.name = "numjobs",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(numjobs)
+ .off1 = td_var_offset(numjobs),
},
{
.name = "cpuload",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(cpuload)
+ .off1 = td_var_offset(cpuload),
},
{
.name = "cpuchunks",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(cpucycle)
+ .off1 = td_var_offset(cpucycle),
},
{
.name = "direct",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(odirect)
+ .off1 = td_var_offset(odirect),
},
{
.name = "overwrite",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(overwrite)
+ .off1 = td_var_offset(overwrite),
},
#ifdef FIO_HAVE_CPU_AFFINITY
{
{
.name = "end_fsync",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(end_fsync)
+ .off1 = td_var_offset(end_fsync),
},
{
.name = "unlink",
- .type = FIO_OPT_STR_SET,
+ .type = FIO_OPT_INT,
.off1 = td_var_offset(unlink),
},
{
static int def_timeout = DEF_TIMEOUT;
-static char fio_version_string[] = "fio 1.9";
+static char fio_version_string[] = "fio 1.10";
static char **ini_file;
static int max_jobs = MAX_JOBS;
int len = 0;
if (td->directory && td->directory[0] != '\0')
- sprintf(tmp, "%s/", td->directory);
+ len = sprintf(tmp, "%s/", td->directory);
td->files = malloc(sizeof(struct fio_file) * td->nr_files);
else
sprintf(tmp + len, "%s.%d.%d", jobname, td->thread_number, i);
f->file_name = strdup(tmp);
+ fprintf(stderr, "%s\n", f->file_name);
}
} else {
td->nr_files = 1;
def_thread.write_lat_log = write_lat_log;
def_thread.norandommap = DEF_NO_RAND_MAP;
def_thread.hugepage_size = DEF_HUGEPAGE_SIZE;
+ def_thread.thinktime_blocks = DEF_THINKTIME_BLOCKS;
#ifdef FIO_HAVE_DISK_UTIL
def_thread.do_disk_util = 1;
#endif
break;
}
default:
- printf("optarg <<%s>>\n", argv[optind]);
break;
}
}