#include <ctype.h>
#include <string.h>
#include <assert.h>
-#include <libgen.h>
-#include <fcntl.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include "fio.h"
#include "verify.h"
#include "parse.h"
-#include "lib/fls.h"
#include "lib/pattern.h"
#include "options.h"
#include "optgroup.h"
return (int) bsp1->perc - (int) bsp2->perc;
}
-#define SPLIT_MAX_ENTRY 100
-
struct split {
unsigned int nr;
- unsigned int val1[SPLIT_MAX_ENTRY];
- unsigned long long val2[SPLIT_MAX_ENTRY];
+ unsigned int val1[ZONESPLIT_MAX];
+ unsigned long long val2[ZONESPLIT_MAX];
};
static int split_parse_ddir(struct thread_options *o, struct split *split,
- enum fio_ddir ddir, char *str, bool absolute)
+ enum fio_ddir ddir, char *str, bool absolute,
+ unsigned int max_splits)
{
unsigned long long perc;
unsigned int i;
split->val1[i] = val;
split->val2[i] = perc;
i++;
- if (i == SPLIT_MAX_ENTRY)
+ if (i == max_splits) {
+ log_err("fio: hit max of %d split entries\n", i);
break;
+ }
}
split->nr = i;
memset(&split, 0, sizeof(split));
- if (split_parse_ddir(o, &split, ddir, str, data))
+ if (split_parse_ddir(o, &split, ddir, str, data, BSSPLIT_MAX))
return 1;
if (!split.nr)
return 0;
memset(&split, 0, sizeof(split));
- if (split_parse_ddir(o, &split, ddir, str, absolute))
+ if (split_parse_ddir(o, &split, ddir, str, absolute, ZONESPLIT_MAX))
return 1;
if (!split.nr)
return 0;
if (parse_dryrun())
return 0;
- td->o.ss_state |= __FIO_SS_PCT;
+ td->o.ss_state |= FIO_SS_PCT;
td->o.ss_limit.u.f = val;
- } else if (td->o.ss_state & __FIO_SS_IOPS) {
+ } else if (td->o.ss_state & FIO_SS_IOPS) {
if (!str_to_float(nr, &val, 0)) {
log_err("fio: steadystate IOPS threshold postfix parsing failed\n");
free(nr);
return 0;
}
-static int rw_verify(struct fio_option *o, void *data)
+static int rw_verify(const struct fio_option *o, void *data)
{
struct thread_data *td = cb_data_to_td(data);
return 0;
}
-static int gtod_cpu_verify(struct fio_option *o, void *data)
+static int gtod_cpu_verify(const struct fio_option *o, void *data)
{
#ifndef FIO_HAVE_CPU_AFFINITY
struct thread_data *td = cb_data_to_td(data);
.help = "GUASI IO engine",
},
#endif
-#ifdef FIO_HAVE_BINJECT
- { .ival = "binject",
- .help = "binject direct inject block engine",
- },
-#endif
#ifdef CONFIG_RDMA
{ .ival = "rdma",
.help = "RDMA IO engine",
#endif
#ifdef CONFIG_PMEMBLK
{ .ival = "pmemblk",
- .help = "NVML libpmemblk based IO engine",
+ .help = "PMDK libpmemblk based IO engine",
},
#endif
},
#ifdef CONFIG_LIBPMEM
{ .ival = "libpmem",
- .help = "NVML libpmem based IO engine",
+ .help = "PMDK libpmem based IO engine",
},
#endif
},
.posval = {
{ .ival = "0",
.oval = F_ADV_NONE,
- .help = "Don't issue fadvise",
+ .help = "Don't issue fadvise/madvise",
},
{ .ival = "1",
.oval = F_ADV_TYPE,
.group = FIO_OPT_G_IOLOG,
.pow2 = 1,
},
+ {
+ .name = "replay_time_scale",
+ .lname = "Replay Time Scale",
+ .type = FIO_OPT_INT,
+ .off1 = offsetof(struct thread_options, replay_time_scale),
+ .def = "100",
+ .minval = 1,
+ .parent = "read_iolog",
+ .hide = 1,
+ .help = "Scale time for replay events",
+ .category = FIO_OPT_C_IO,
+ .group = FIO_OPT_G_IOLOG,
+ },
{
.name = "exec_prerun",
.lname = "Pre-execute runnable",
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_RATE,
},
+ {
+ .name = "rate_ignore_thinktime",
+ .lname = "Rate ignore thinktime",
+ .type = FIO_OPT_BOOL,
+ .off1 = offsetof(struct thread_options, rate_ign_think),
+ .help = "Rated IO ignores thinktime settings",
+ .parent = "rate",
+ .category = FIO_OPT_C_IO,
+ .group = FIO_OPT_G_RATE,
+ },
{
.name = "max_latency",
- .lname = "Max Latency",
- .type = FIO_OPT_INT,
+ .lname = "Max Latency (usec)",
+ .type = FIO_OPT_STR_VAL_TIME,
.off1 = offsetof(struct thread_options, max_latency),
.help = "Maximum tolerated IO latency (usec)",
.is_time = 1,
opts_copy = dup_and_sub_options(opts, num_opts);
for (ret = 0, i = 0, unknown = 0; i < num_opts; i++) {
- struct fio_option *o;
+ const struct fio_option *o;
int newret = parse_option(opts_copy[i], opts[i], fio_options,
&o, &td->o, &td->opt_list);
opts = opts_copy;
}
for (i = 0; i < num_opts; i++) {
- struct fio_option *o = NULL;
+ const struct fio_option *o = NULL;
int newret = 1;
if (!opts_copy[i])
ret = parse_cmd_option(opt, val, fio_options, &td->o, &td->opt_list);
if (!ret) {
- struct fio_option *o;
+ const struct fio_option *o;
- o = find_option(fio_options, opt);
+ o = find_option_c(fio_options, opt);
if (o)
fio_option_mark_set(&td->o, o);
}
return kb_base;
}
-int add_option(struct fio_option *o)
+int add_option(const struct fio_option *o)
{
struct fio_option *__o;
int opt_index = 0;
return false;
}
-void fio_option_mark_set(struct thread_options *o, struct fio_option *opt)
+void fio_option_mark_set(struct thread_options *o, const struct fio_option *opt)
{
unsigned int opt_off, index, offset;