Commit d6d5f870 authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

iscsi: Only call iscsi_conn_stop in exit path



For migrating a connection, don't stop it entirely.

Change-Id: I0e09698e03127c04257485a0a2af262ed1a7761a
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453017


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent cb0c0509
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -751,7 +751,9 @@ iscsi_conn_stop(struct spdk_iscsi_conn *conn)
{
	struct spdk_iscsi_tgt_node *target;

	if (conn->state == ISCSI_CONN_STATE_EXITED && conn->sess != NULL &&
	assert(conn->state == ISCSI_CONN_STATE_EXITED);

	if (conn->sess != NULL &&
	    conn->sess->session_type == SESSION_TYPE_NORMAL &&
	    conn->full_feature) {
		target = conn->sess->target;
@@ -1502,7 +1504,8 @@ spdk_iscsi_conn_schedule(struct spdk_iscsi_conn *conn)

	iscsi_poll_group_remove_conn_sock(conn);
	spdk_poller_unregister(&conn->flush_poller);
	iscsi_conn_stop(conn);
	__sync_fetch_and_sub(&g_num_connections[conn->lcore], 1);
	iscsi_poll_group_remove_conn(conn);

	__sync_fetch_and_add(&g_num_connections[lcore], 1);
	conn->last_nopin = spdk_get_ticks();