iscsi: Do not output error for connect reset issue
The initiator may close the connection unexpectly due to many differnent reasons, which should not print error log of our SPDK iSCSI target. Change-Id: I652be75c0762547f27212503e5b52bfc898ecc8f Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/412593 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
b6fce1912d
commit
6ff0c0cfb4
@ -737,8 +737,14 @@ spdk_iscsi_conn_read_data(struct spdk_iscsi_conn *conn, int bytes,
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
||||
return 0;
|
||||
} else {
|
||||
SPDK_ERRLOG("spdk_sock_recv() failed, errno %d: %s\n",
|
||||
errno, spdk_strerror(errno));
|
||||
/* For connect reset issue, do not output error log */
|
||||
if (errno == ECONNRESET) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "spdk_sock_recv() failed, errno %d: %s\n",
|
||||
errno, spdk_strerror(errno));
|
||||
} else {
|
||||
SPDK_ERRLOG("spdk_sock_recv() failed, errno %d: %s\n",
|
||||
errno, spdk_strerror(errno));
|
||||
}
|
||||
}
|
||||
return SPDK_ISCSI_CONNECTION_FATAL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user