Commit 4179c0ac authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Ben Walker
Browse files

nvmf: expose subsystem poll as a public API



This will be used in future patches outside the library.

Change-Id: I1fcf5709944a884e161e5a6a9eaec033a995a812
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 4c6e4d49
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -72,10 +72,9 @@ nvmf_find_subsystem(const char *subnqn, const char *hostnqn)
	return NULL;
}

static void
spdk_nvmf_subsystem_poller(void *arg)
void
spdk_nvmf_subsystem_poll(struct spdk_nvmf_subsystem *subsystem)
{
	struct spdk_nvmf_subsystem *subsystem = arg;
	struct nvmf_session *session = subsystem->session;

	if (!session) {
@@ -92,6 +91,14 @@ spdk_nvmf_subsystem_poller(void *arg)
	spdk_nvmf_session_poll(session);
}

static void
spdk_nvmf_subsystem_poller(void *arg)
{
	struct spdk_nvmf_subsystem *subsystem = arg;

	spdk_nvmf_subsystem_poll(subsystem);
}

struct spdk_nvmf_subsystem *
nvmf_create_subsystem(int num, const char *name,
		      enum spdk_nvmf_subtype subtype,
+2 −0
Original line number Diff line number Diff line
@@ -167,5 +167,7 @@ spdk_shutdown_nvmf_subsystems(void);
void
spdk_format_discovery_log(struct spdk_nvmf_discovery_log_page *disc_log, uint32_t length);

void spdk_nvmf_subsystem_poll(struct spdk_nvmf_subsystem *subsystem);

extern const struct spdk_nvmf_ctrlr_ops spdk_nvmf_direct_ctrlr_ops;
#endif /* SPDK_NVMF_SUBSYSTEM_H */