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 |
} |