Commit 3f987aa8 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

nvmf: remove spdk_nvmf_construct_subsystem()



After the previous cleanup patches, this function was just calling
nvmf_tgt_create_subsystem() with no other functionality.

Change-Id: I1b20887cade7496093e0b69778df30f818eeb764
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403379


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 1d480129
Loading
Loading
Loading
Loading
+1 −20
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ spdk_nvmf_parse_subsystem(struct spdk_conf_section *sp)
		return -1;
	}

	subsystem = spdk_nvmf_construct_subsystem(nqn);
	subsystem = nvmf_tgt_create_subsystem(nqn, SPDK_NVMF_SUBTYPE_NVME, 0);
	if (subsystem == NULL) {
		goto done;
	}
@@ -354,22 +354,3 @@ spdk_nvmf_parse_conf(void)

	return 0;
}

struct spdk_nvmf_subsystem *
	spdk_nvmf_construct_subsystem(const char *name)
{
	struct spdk_nvmf_subsystem *subsystem;

	if (name == NULL) {
		SPDK_ERRLOG("No NQN specified for subsystem\n");
		return NULL;
	}

	subsystem = nvmf_tgt_create_subsystem(name, SPDK_NVMF_SUBTYPE_NVME, 0);
	if (subsystem == NULL) {
		SPDK_ERRLOG("Subsystem creation failed\n");
		return NULL;
	}

	return subsystem;
}
+0 −2
Original line number Diff line number Diff line
@@ -77,6 +77,4 @@ 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);

struct spdk_nvmf_subsystem *spdk_nvmf_construct_subsystem(const char *name);

#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 = spdk_nvmf_construct_subsystem(req.nqn);
	subsystem = nvmf_tgt_create_subsystem(req.nqn, SPDK_NVMF_SUBTYPE_NVME, 0);
	if (!subsystem) {
		goto invalid;
	}