iscsi: Schedule the connection only after completing login processing
Previously the connection was scheduled to another core just after setting conn->full_feature to 1, but conn->state was still ISCSI_CONN_STATE_INVALID. The connection started to run on another core but could not run normally until conn->state became ISCSI_CONN_STATE_RUNNING. conn->state was changed late to ISCSI_CONN_STATE_RUNNING after sending the first login reponse. This gap window had caused intermittent critical failures. Based on this analysis, this patch changes to call spdk_iscsi_conn_schedule() just after sending the final login response. Whether any login response is final or not can be known by checking conn->full_feature is not zero. Fixes #785 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I8ea55fef27e2f332fcd789d32daf479a24c0588d Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457414 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
fc3e1b6fb0
commit
3cfb1fe8dd
@ -2129,7 +2129,6 @@ iscsi_op_login_rsp_handle_t_bit(struct spdk_iscsi_conn *conn,
|
||||
}
|
||||
|
||||
conn->full_feature = 1;
|
||||
spdk_iscsi_conn_schedule(conn);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -2241,6 +2240,9 @@ iscsi_op_login(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
rc = iscsi_op_login_response(conn, rsp_pdu, *params_p);
|
||||
if (rc == 0) {
|
||||
conn->state = ISCSI_CONN_STATE_RUNNING;
|
||||
if (conn->full_feature != 0) {
|
||||
spdk_iscsi_conn_schedule(conn);
|
||||
}
|
||||
} else {
|
||||
SPDK_ERRLOG("login error - connection will be destroyed\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user