nvmf: remove nvmf_tgt_create_subsystem()

After the previous cleanup patch, this was just calling
spdk_nvmf_subsystem_create() without any other functionality, so call
spdk_nvmf_subsystem_create() directly from its call sites and remove it.

Change-Id: I5dc1a0a00025a120d71270c5a5c94e8d74c2a3ab
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403381
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Daniel Verkamp 2018-03-09 17:17:02 -07:00
parent 524e8fc976
commit bbbd0d643a
4 changed files with 4 additions and 22 deletions

View File

@ -61,7 +61,8 @@ spdk_add_nvmf_discovery_subsystem(void)
{
struct spdk_nvmf_subsystem *subsystem;
subsystem = nvmf_tgt_create_subsystem(SPDK_NVMF_DISCOVERY_NQN, SPDK_NVMF_SUBTYPE_DISCOVERY, 0);
subsystem = spdk_nvmf_subsystem_create(g_tgt.tgt, SPDK_NVMF_DISCOVERY_NQN,
SPDK_NVMF_SUBTYPE_DISCOVERY, 0);
if (subsystem == NULL) {
SPDK_ERRLOG("Failed creating discovery nvmf library subsystem\n");
return -1;
@ -183,7 +184,7 @@ spdk_nvmf_parse_subsystem(struct spdk_conf_section *sp)
return -1;
}
subsystem = nvmf_tgt_create_subsystem(nqn, SPDK_NVMF_SUBTYPE_NVME, 0);
subsystem = spdk_nvmf_subsystem_create(g_tgt.tgt, nqn, SPDK_NVMF_SUBTYPE_NVME, 0);
if (subsystem == NULL) {
goto done;
}

View File

@ -74,7 +74,4 @@ extern struct nvmf_tgt g_tgt;
int spdk_nvmf_parse_conf(void);
struct spdk_nvmf_subsystem *nvmf_tgt_create_subsystem(const char *name,
enum spdk_nvmf_subtype subtype, uint32_t num_ns);
#endif

View File

@ -605,7 +605,7 @@ spdk_rpc_construct_nvmf_subsystem(struct spdk_jsonrpc_request *request,
SPDK_NOTICELOG("Ignoring it and continuing.\n");
}
subsystem = nvmf_tgt_create_subsystem(req.nqn, SPDK_NVMF_SUBTYPE_NVME, 0);
subsystem = spdk_nvmf_subsystem_create(g_tgt.tgt, req.nqn, SPDK_NVMF_SUBTYPE_NVME, 0);
if (!subsystem) {
goto invalid;
}

View File

@ -83,22 +83,6 @@ spdk_nvmf_subsystem_fini(void)
}
}
struct spdk_nvmf_subsystem *
nvmf_tgt_create_subsystem(const char *name, enum spdk_nvmf_subtype subtype, uint32_t num_ns)
{
struct spdk_nvmf_subsystem *subsystem;
subsystem = spdk_nvmf_subsystem_create(g_tgt.tgt, name, subtype, num_ns);
if (subsystem == NULL) {
SPDK_ERRLOG("Subsystem creation failed\n");
return NULL;
}
SPDK_NOTICELOG("allocated subsystem %s\n", name);
return subsystem;
}
static void
nvmf_tgt_poll_group_add(void *arg1, void *arg2)
{