提交 e6273993 编写于 作者: M Mike Christie 提交者: James Bottomley

[SCSI] iscsi: redirect fix

From tomof@acm.org:

There is one more issue about Equallogic systems. They send
re-direction info with FIN. I think that the kernel module needs to
let iscsid to read data from the socket before killing it.
Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NAlex Aizman <itn780@yahoo.com>
Signed-off-by: NDmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 0d2f1655
......@@ -1237,8 +1237,9 @@ iscsi_tcp_state_change(struct sock *sk)
conn = (struct iscsi_conn*)sk->sk_user_data;
session = conn->session;
if (sk->sk_state == TCP_CLOSE_WAIT ||
sk->sk_state == TCP_CLOSE) {
if ((sk->sk_state == TCP_CLOSE_WAIT ||
sk->sk_state == TCP_CLOSE) &&
!atomic_read(&sk->sk_rmem_alloc)) {
debug_tcp("iscsi_tcp_state_change: TCP_CLOSE|TCP_CLOSE_WAIT\n");
iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册