projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
options: warn if we exceed the supported number of split entries
[fio.git]
/
init.c
diff --git
a/init.c
b/init.c
index c70f6a0a125549d073d7b273b68fde8a1ae2356e..607f7e0c29a472443b8bf90466ffe5ea5f8be4cf 100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-78,7
+78,7
@@
unsigned int fio_debug_jobno = -1;
unsigned int *fio_debug_jobp = NULL;
static char cmd_optstr[256];
unsigned int *fio_debug_jobp = NULL;
static char cmd_optstr[256];
-static
int
did_arg;
+static
bool
did_arg;
#define FIO_CLIENT_FLAG (1 << 16)
#define FIO_CLIENT_FLAG (1 << 16)
@@
-925,6
+925,13
@@
static int fixup_options(struct thread_data *td)
ret = 1;
}
ret = 1;
}
+ /*
+ * Fix these up to be nsec internally
+ */
+ o->max_latency *= 1000ULL;
+ o->latency_target *= 1000ULL;
+ o->latency_window *= 1000ULL;
+
return ret;
}
return ret;
}
@@
-1105,6
+1112,7
@@
int ioengine_load(struct thread_data *td)
static void init_flags(struct thread_data *td)
{
struct thread_options *o = &td->o;
static void init_flags(struct thread_data *td)
{
struct thread_options *o = &td->o;
+ int i;
if (o->verify_backlog)
td->flags |= TD_F_VER_BACKLOG;
if (o->verify_backlog)
td->flags |= TD_F_VER_BACKLOG;
@@
-1134,6
+1142,13
@@
static void init_flags(struct thread_data *td)
if (o->mem_type == MEM_CUDA_MALLOC)
td->flags &= ~TD_F_SCRAMBLE_BUFFERS;
if (o->mem_type == MEM_CUDA_MALLOC)
td->flags &= ~TD_F_SCRAMBLE_BUFFERS;
+
+ for (i = 0; i < DDIR_RWDIR_CNT; i++) {
+ if (option_check_rate(td, i)) {
+ td->flags |= TD_F_CHECK_RATE;
+ break;
+ }
+ }
}
static int setup_random_seeds(struct thread_data *td)
}
static int setup_random_seeds(struct thread_data *td)
@@
-2430,35
+2445,35
@@
int parse_cmd_line(int argc, char *argv[], int client_type)
output_format |= FIO_OUTPUT_TERSE;
break;
case 'h':
output_format |= FIO_OUTPUT_TERSE;
break;
case 'h':
- did_arg =
1
;
+ did_arg =
true
;
if (!cur_client) {
usage(argv[0]);
do_exit++;
}
break;
case 'c':
if (!cur_client) {
usage(argv[0]);
do_exit++;
}
break;
case 'c':
- did_arg =
1
;
+ did_arg =
true
;
if (!cur_client) {
fio_show_option_help(optarg);
do_exit++;
}
break;
case 'i':
if (!cur_client) {
fio_show_option_help(optarg);
do_exit++;
}
break;
case 'i':
- did_arg =
1
;
+ did_arg =
true
;
if (!cur_client) {
fio_show_ioengine_help(optarg);
do_exit++;
}
break;
case 's':
if (!cur_client) {
fio_show_ioengine_help(optarg);
do_exit++;
}
break;
case 's':
- did_arg =
1
;
+ did_arg =
true
;
dump_cmdline = 1;
break;
case 'r':
read_only = 1;
break;
case 'v':
dump_cmdline = 1;
break;
case 'r':
read_only = 1;
break;
case 'v':
- did_arg =
1
;
+ did_arg =
true
;
if (!cur_client) {
log_info("%s\n", fio_version_string);
do_exit++;
if (!cur_client) {
log_info("%s\n", fio_version_string);
do_exit++;
@@
-2494,7
+2509,7
@@
int parse_cmd_line(int argc, char *argv[], int client_type)
do_exit++;
break;
case 'P':
do_exit++;
break;
case 'P':
- did_arg =
1
;
+ did_arg =
true
;
parse_only = 1;
break;
case 'x': {
parse_only = 1;
break;
case 'x': {
@@
-2516,12
+2531,12
@@
int parse_cmd_line(int argc, char *argv[], int client_type)
#ifdef CONFIG_ZLIB
case 'X':
exit_val = iolog_file_inflate(optarg);
#ifdef CONFIG_ZLIB
case 'X':
exit_val = iolog_file_inflate(optarg);
- did_arg
++
;
+ did_arg
= true
;
do_exit++;
break;
#endif
case 'p':
do_exit++;
break;
#endif
case 'p':
- did_arg =
1
;
+ did_arg =
true
;
if (exec_profile)
free(exec_profile);
exec_profile = strdup(optarg);
if (exec_profile)
free(exec_profile);
exec_profile = strdup(optarg);
@@
-2535,7
+2550,7
@@
int parse_cmd_line(int argc, char *argv[], int client_type)
if (ret)
goto out_free;
td = NULL;
if (ret)
goto out_free;
td = NULL;
- did_arg =
1
;
+ did_arg =
true
;
}
if (!td) {
int is_section = !strncmp(opt, "name", 4);
}
if (!td) {
int is_section = !strncmp(opt, "name", 4);
@@
-2610,7
+2625,7
@@
int parse_cmd_line(int argc, char *argv[], int client_type)
}
break;
case 'S':
}
break;
case 'S':
- did_arg =
1
;
+ did_arg =
true
;
#ifndef CONFIG_NO_SHM
if (nr_clients) {
log_err("fio: can't be both client and server\n");
#ifndef CONFIG_NO_SHM
if (nr_clients) {
log_err("fio: can't be both client and server\n");
@@
-2636,14
+2651,14
@@
int parse_cmd_line(int argc, char *argv[], int client_type)
case 'I':
if ((ret = fio_idle_prof_parse_opt(optarg))) {
/* exit on error and calibration only */
case 'I':
if ((ret = fio_idle_prof_parse_opt(optarg))) {
/* exit on error and calibration only */
- did_arg =
1
;
+ did_arg =
true
;
do_exit++;
if (ret == -1)
exit_val = 1;
}
break;
case 'C':
do_exit++;
if (ret == -1)
exit_val = 1;
}
break;
case 'C':
- did_arg =
1
;
+ did_arg =
true
;
if (is_backend) {
log_err("fio: can't be both client and server\n");
do_exit++;
if (is_backend) {
log_err("fio: can't be both client and server\n");
do_exit++;
@@
-2700,19
+2715,19
@@
int parse_cmd_line(int argc, char *argv[], int client_type)
}
break;
case 'R':
}
break;
case 'R':
- did_arg =
1
;
+ did_arg =
true
;
if (fio_client_add_ini_file(cur_client, optarg, true)) {
do_exit++;
exit_val = 1;
}
break;
case 'T':
if (fio_client_add_ini_file(cur_client, optarg, true)) {
do_exit++;
exit_val = 1;
}
break;
case 'T':
- did_arg =
1
;
+ did_arg =
true
;
do_exit++;
exit_val = fio_monotonic_clocktest(1);
break;
case 'G':
do_exit++;
exit_val = fio_monotonic_clocktest(1);
break;
case 'G':
- did_arg =
1
;
+ did_arg =
true
;
do_exit++;
exit_val = fio_crctest(optarg);
break;
do_exit++;
exit_val = fio_crctest(optarg);
break;