Commit 170d18f0 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Ben Walker
Browse files

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: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450733


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent adbae389
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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);
}