Commit 6ff0c0cf authored by Ziye Yang's avatar Ziye Yang Committed by Daniel Verkamp
Browse files

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: default avatarZiye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/412593


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent b6fce191
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -736,10 +736,16 @@ spdk_iscsi_conn_read_data(struct spdk_iscsi_conn *conn, int bytes,
	if (ret < 0) {
		if (errno == EAGAIN || errno == EWOULDBLOCK) {
			return 0;
		} else {
			/* 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;
	}