nvmf: expose subsystem poll as a public API

This will be used in future patches outside the library.

Change-Id: I1fcf5709944a884e161e5a6a9eaec033a995a812
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-08-16 10:43:50 -07:00 committed by Ben Walker
parent 4c6e4d4963
commit 4179c0acc5
2 changed files with 12 additions and 3 deletions

View File

@ -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,

View File

@ -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 */