iscsi: Use threads in iscsi_conn_check_shutdown
This can use threads instead of events. Change-Id: I8a55ad512038dd75218a9a6af17d135eba6949f7 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452726 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
5512724d1d
commit
31dd18697a
@ -616,7 +616,7 @@ iscsi_conns_cleanup(void)
|
||||
}
|
||||
|
||||
static void
|
||||
iscsi_conn_check_shutdown_cb(void *arg1, void *arg2)
|
||||
iscsi_conn_check_shutdown_cb(void *arg1)
|
||||
{
|
||||
iscsi_conns_cleanup();
|
||||
spdk_shutdown_iscsi_conns_done();
|
||||
@ -625,16 +625,13 @@ iscsi_conn_check_shutdown_cb(void *arg1, void *arg2)
|
||||
static int
|
||||
iscsi_conn_check_shutdown(void *arg)
|
||||
{
|
||||
struct spdk_event *event;
|
||||
|
||||
if (spdk_iscsi_get_active_conns(NULL) != 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
spdk_poller_unregister(&g_shutdown_timer);
|
||||
event = spdk_event_allocate(spdk_env_get_current_core(),
|
||||
iscsi_conn_check_shutdown_cb, NULL, NULL);
|
||||
spdk_event_call(event);
|
||||
|
||||
spdk_thread_send_msg(spdk_get_thread(), iscsi_conn_check_shutdown_cb, NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user