iscsi: wait with spdk_app_stop until poller is unregistered
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I9218b618544def301a4509eda1b266390a80dba5 Reviewed-on: https://review.gerrithub.io/382830 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
c0ed81a72b
commit
4768b198da
@ -752,13 +752,22 @@ spdk_iscsi_conns_cleanup(void)
|
||||
shm_unlink(g_shm_name);
|
||||
}
|
||||
|
||||
static void
|
||||
spdk_iscsi_conn_check_shutdown_cb(void *arg1, void *arg2)
|
||||
{
|
||||
spdk_iscsi_conns_cleanup();
|
||||
spdk_app_stop(0);
|
||||
}
|
||||
|
||||
static void
|
||||
spdk_iscsi_conn_check_shutdown(void *arg)
|
||||
{
|
||||
struct spdk_event *event;
|
||||
|
||||
if (spdk_iscsi_get_active_conns() == 0) {
|
||||
spdk_poller_unregister(&g_shutdown_timer, NULL);
|
||||
spdk_iscsi_conns_cleanup();
|
||||
spdk_app_stop(0);
|
||||
event = spdk_event_allocate(spdk_env_get_current_core(), spdk_iscsi_conn_check_shutdown_cb, NULL,
|
||||
NULL);
|
||||
spdk_poller_unregister(&g_shutdown_timer, event);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user