Commit bbbd0d64 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403381


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 524e8fc9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;
	}
+0 −3
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}
+0 −16
Original line number Diff line number Diff line
@@ -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)
{