lib/iscsi: Factor out the operation to start exiting connections
Factor out the operation to start exiting connections into a function. This patch doesn't change any behavior. Change-Id: I8f48961bcc95c480636e0e0d8fbb8ef029818d9e Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450733 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
adbae38935
commit
170d18f0d4
@ -767,7 +767,8 @@ iscsi_conn_stop(struct spdk_iscsi_conn *conn)
|
||||
iscsi_poll_group_remove_conn(conn);
|
||||
}
|
||||
|
||||
void spdk_shutdown_iscsi_conns(void)
|
||||
static void
|
||||
iscsi_conns_start_exit(void)
|
||||
{
|
||||
struct spdk_iscsi_conn *conn;
|
||||
int i;
|
||||
@ -789,6 +790,13 @@ void spdk_shutdown_iscsi_conns(void)
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&g_conns_mutex);
|
||||
}
|
||||
|
||||
void
|
||||
spdk_shutdown_iscsi_conns(void)
|
||||
{
|
||||
iscsi_conns_start_exit();
|
||||
|
||||
g_shutdown_timer = spdk_poller_register(iscsi_conn_check_shutdown, NULL, 1000);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user