bdevperf: config file: threat -T as filename parameter

This will allow to override job config filename from CLI.

Note that -T is required when using job config that has
missing filenames, but then it is optional if job config is not used.

Change-Id: I7d392ff2d0554524cfcb5072182ec806013083de
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3452
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Vitaliy Mysak 2020-07-20 23:10:38 +02:00 committed by Tomasz Zawadzki
parent 74c1028c80
commit 6e1528503a

View File

@ -1657,6 +1657,9 @@ parse_uint_option(struct spdk_conf_section *s, const char *name, int def)
static void
config_set_cli_args(struct job_config *config)
{
if (g_job_bdev_name) {
config->filename = g_job_bdev_name;
}
if (g_io_size > 0) {
config->bs = g_io_size;
}
@ -1687,10 +1690,6 @@ read_job_config(void)
return 0;
}
if (g_job_bdev_name) {
fprintf(stderr, "-T options will be ignored since -j is used\n");
}
g_bdevperf_conf = spdk_conf_allocate();
if (g_bdevperf_conf == NULL) {
fprintf(stderr, "Could not allocate job config structure\n");