View | Details | Raw Unified | Return to bug 179989 | Differences between
and this patch

Collapse All | Expand All

(-)src/istgt_iscsi.c (-12 / +12 lines)
Lines 670-685 Link Here
670
	if (rc < 0) {
670
	if (rc < 0) {
671
		now = time(NULL);
671
		now = time(NULL);
672
		if (errno == ECONNRESET) {
672
		if (errno == ECONNRESET) {
673
			ISTGT_WARNLOG("Connection reset by peer (%s,time=%d)\n",
673
			ISTGT_WARNLOG("Connection reset by peer (%s,time=%.0f)\n",
674
			    conn->initiator_name, (int)difftime(now, start));
674
			    conn->initiator_name, difftime(now, start));
675
			conn->state = CONN_STATE_EXITING;
675
			conn->state = CONN_STATE_EXITING;
676
		} else if (errno == ETIMEDOUT) {
676
		} else if (errno == ETIMEDOUT) {
677
			ISTGT_WARNLOG("Operation timed out (%s,time=%d)\n",
677
			ISTGT_WARNLOG("Operation timed out (%s,time=%.0f)\n",
678
			    conn->initiator_name, (int)difftime(now, start));
678
			    conn->initiator_name, difftime(now, start));
679
			conn->state = CONN_STATE_EXITING;
679
			conn->state = CONN_STATE_EXITING;
680
		} else {
680
		} else {
681
			ISTGT_ERRLOG("iscsi_read() failed (errno=%d,%s,time=%d)\n",
681
			ISTGT_ERRLOG("iscsi_read() failed (errno=%d,%s,time=%.0f)\n",
682
			    errno, conn->initiator_name, (int)difftime(now, start));
682
			    errno, conn->initiator_name, difftime(now, start));
683
		}
683
		}
684
		return -1;
684
		return -1;
685
	}
685
	}
Lines 762-769 Link Here
762
		rc = readv(conn->sock, &iovec[0], 4);
762
		rc = readv(conn->sock, &iovec[0], 4);
763
		if (rc < 0) {
763
		if (rc < 0) {
764
			now = time(NULL);
764
			now = time(NULL);
765
			ISTGT_ERRLOG("readv() failed (%d,errno=%d,%s,time=%d)\n",
765
			ISTGT_ERRLOG("readv() failed (%d,errno=%d,%s,time=%.0f)\n",
766
			    rc, errno, conn->initiator_name, (int)difftime(now, start));
766
			    rc, errno, conn->initiator_name, difftime(now, start));
767
			return -1;
767
			return -1;
768
		}
768
		}
769
		if (rc == 0) {
769
		if (rc == 0) {
Lines 1257-1264 Link Here
1257
		rc = writev(conn->sock, &iovec[0], 5);
1257
		rc = writev(conn->sock, &iovec[0], 5);
1258
		if (rc < 0) {
1258
		if (rc < 0) {
1259
			now = time(NULL);
1259
			now = time(NULL);
1260
			ISTGT_ERRLOG("writev() failed (errno=%d,%s,time=%d)\n",
1260
			ISTGT_ERRLOG("writev() failed (errno=%d,%s,time=%.0f)\n",
1261
			    errno, conn->initiator_name, (int)difftime(now, start));
1261
			    errno, conn->initiator_name, difftime(now, start));
1262
			return -1;
1262
			return -1;
1263
		}
1263
		}
1264
		nbytes -= rc;
1264
		nbytes -= rc;
Lines 3590-3598 Link Here
3590
				if (rc < 0) {
3590
				if (rc < 0) {
3591
					now = time(NULL);
3591
					now = time(NULL);
3592
					ISTGT_ERRLOG("MCS: CmdSN(%u) error ExpCmdSN=%u "
3592
					ISTGT_ERRLOG("MCS: CmdSN(%u) error ExpCmdSN=%u "
3593
					    "(time=%d)\n",
3593
					    "(time=%.0f)\n",
3594
					    CmdSN, conn->sess->ExpCmdSN,
3594
					    CmdSN, conn->sess->ExpCmdSN,
3595
					    (int)difftime(now, start));
3595
					    difftime(now, start));
3596
					SESS_MTX_UNLOCK(conn);
3596
					SESS_MTX_UNLOCK(conn);
3597
					return -1;
3597
					return -1;
3598
				}
3598
				}
(-)src/istgt_lu_disk.c (-4 / +4 lines)
Lines 5288-5296 Link Here
5288
						MTX_UNLOCK(&lu_task->trans_mutex);
5288
						MTX_UNLOCK(&lu_task->trans_mutex);
5289
						now = time(NULL);
5289
						now = time(NULL);
5290
						ISTGT_ERRLOG("timeout trans_cond CmdSN=%u "
5290
						ISTGT_ERRLOG("timeout trans_cond CmdSN=%u "
5291
						    "(time=%d)\n",
5291
						    "(time=%.0f)\n",
5292
						    lu_task->lu_cmd.CmdSN,
5292
						    lu_task->lu_cmd.CmdSN,
5293
						    (int)difftime(now, start));
5293
						    difftime(now, start));
5294
						/* timeout */
5294
						/* timeout */
5295
						return -1;
5295
						return -1;
5296
					}
5296
					}
Lines 5326-5333 Link Here
5326
				if (rc == ETIMEDOUT) {
5326
				if (rc == ETIMEDOUT) {
5327
					lu_task->error = 1;
5327
					lu_task->error = 1;
5328
					now = time(NULL);
5328
					now = time(NULL);
5329
					ISTGT_ERRLOG("timeout trans_cond CmdSN=%u (time=%d)\n",
5329
					ISTGT_ERRLOG("timeout trans_cond CmdSN=%u (time=%.0f)\n",
5330
					    lu_task->lu_cmd.CmdSN, (int)difftime(now, start));
5330
					    lu_task->lu_cmd.CmdSN, difftime(now, start));
5331
					return -1;
5331
					return -1;
5332
				}
5332
				}
5333
				lu_task->error = 1;
5333
				lu_task->error = 1;

Return to bug 179989