projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix segfault with verify_async
[fio.git]
/
options.c
diff --git
a/options.c
b/options.c
index 580d5aa5b95800d707c3fff92a719cc4ac4b1c76..bb46dc9df8cbf707a87671c4b1f0b1867dd79f4b 100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-777,6
+777,7
@@
static int str_gtod_reduce_cb(void *data, int *il)
td->o.disable_clat = !!val;
td->o.disable_slat = !!val;
td->o.disable_bw = !!val;
td->o.disable_clat = !!val;
td->o.disable_slat = !!val;
td->o.disable_bw = !!val;
+ td->o.clat_percentiles = !val;
if (val)
td->tv_cache_mask = 63;
if (val)
td->tv_cache_mask = 63;
@@
-1580,7
+1581,7
@@
static struct fio_option options[FIO_MAX_OPTS] = {
.name = "verify_dump",
.type = FIO_OPT_BOOL,
.off1 = td_var_offset(verify_dump),
.name = "verify_dump",
.type = FIO_OPT_BOOL,
.off1 = td_var_offset(verify_dump),
- .def = "
1
",
+ .def = "
0
",
.help = "Dump contents of good and bad blocks on failure",
.parent = "verify",
},
.help = "Dump contents of good and bad blocks on failure",
.parent = "verify",
},
@@
-2016,7
+2017,7
@@
static struct fio_option options[FIO_MAX_OPTS] = {
.type = FIO_OPT_BOOL,
.off1 = td_var_offset(clat_percentiles),
.help = "Enable the reporting of completion latency percentiles",
.type = FIO_OPT_BOOL,
.off1 = td_var_offset(clat_percentiles),
.help = "Enable the reporting of completion latency percentiles",
- .def = "
0
",
+ .def = "
1
",
},
{
.name = "percentile_list",
},
{
.name = "percentile_list",
@@
-2346,7
+2347,10
@@
int fio_show_option_help(const char *opt)
return show_cmd_help(options, opt);
}
return show_cmd_help(options, opt);
}
-static void __options_mem(struct thread_data *td, int alloc)
+/*
+ * dupe FIO_OPT_STR_STORE options
+ */
+void options_mem_dupe(struct thread_data *td)
{
struct thread_options *o = &td->o;
struct fio_option *opt;
{
struct thread_options *o = &td->o;
struct fio_option *opt;
@@
-2358,32
+2362,13
@@
static void __options_mem(struct thread_data *td, int alloc)
continue;
ptr = (void *) o + opt->off1;
continue;
ptr = (void *) o + opt->off1;
- if (*ptr) {
- if (alloc)
- *ptr = strdup(*ptr);
- else {
- free(*ptr);
- *ptr = NULL;
- }
- }
+ if (!*ptr)
+ ptr = td_var(o, opt->off1);
+ if (*ptr)
+ *ptr = strdup(*ptr);
}
}
}
}
-/*
- * dupe FIO_OPT_STR_STORE options
- */
-void options_mem_dupe(struct thread_data *td)
-{
- __options_mem(td, 1);
-}
-
-void options_mem_free(struct thread_data fio_unused *td)
-{
-#if 0
- __options_mem(td, 0);
-#endif
-}
-
unsigned int fio_get_kb_base(void *data)
{
struct thread_data *td = data;
unsigned int fio_get_kb_base(void *data)
{
struct thread_data *td = data;
@@
-2464,3
+2449,8
@@
void del_opt_posval(const char *optname, const char *ival)
o->posval[i].help = NULL;
}
}
o->posval[i].help = NULL;
}
}
+
+void fio_options_free(struct thread_data *td)
+{
+ options_free(options, td);
+}