fio/nvme: Add 'hostnqn' option to fio configuration file
The user can now specify which host NQN to use for identification purposes. Change-Id: I50d1f868af82a72d57e4bc42d70ee74c6fb1147c Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/415551 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
e051eb8310
commit
81bb01c959
@ -52,6 +52,7 @@ struct spdk_fio_options {
|
||||
int mem_size;
|
||||
int shm_id;
|
||||
int enable_sgl;
|
||||
char *hostnqn;
|
||||
};
|
||||
|
||||
struct spdk_fio_request {
|
||||
@ -138,6 +139,13 @@ static bool
|
||||
probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
struct spdk_nvme_ctrlr_opts *opts)
|
||||
{
|
||||
struct thread_data *td = cb_ctx;
|
||||
struct spdk_fio_options *fio_options = td->eo;
|
||||
|
||||
if (fio_options->hostnqn) {
|
||||
snprintf(opts->hostnqn, sizeof(opts->hostnqn), "%s", fio_options->hostnqn);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -668,6 +676,15 @@ static struct fio_option options[] = {
|
||||
.category = FIO_OPT_C_ENGINE,
|
||||
.group = FIO_OPT_G_INVALID,
|
||||
},
|
||||
{
|
||||
.name = "hostnqn",
|
||||
.lname = "Host NQN to use when connecting to controllers.",
|
||||
.type = FIO_OPT_STR_STORE,
|
||||
.off1 = offsetof(struct spdk_fio_options, hostnqn),
|
||||
.help = "Host NQN",
|
||||
.category = FIO_OPT_C_ENGINE,
|
||||
.group = FIO_OPT_G_INVALID,
|
||||
},
|
||||
{
|
||||
.name = NULL,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user