Lines 1-84
Link Here
|
1 |
--- src/istgt_iscsi.c.orig 2012-10-28 00:26:36.000000000 +0200 |
|
|
2 |
+++ src/istgt_iscsi.c 2013-06-26 00:44:07.000000000 +0200 |
3 |
@@ -670,16 +670,16 @@ |
4 |
if (rc < 0) { |
5 |
now = time(NULL); |
6 |
if (errno == ECONNRESET) { |
7 |
- ISTGT_WARNLOG("Connection reset by peer (%s,time=%d)\n", |
8 |
- conn->initiator_name, (int)difftime(now, start)); |
9 |
+ ISTGT_WARNLOG("Connection reset by peer (%s,time=%.0f)\n", |
10 |
+ conn->initiator_name, difftime(now, start)); |
11 |
conn->state = CONN_STATE_EXITING; |
12 |
} else if (errno == ETIMEDOUT) { |
13 |
- ISTGT_WARNLOG("Operation timed out (%s,time=%d)\n", |
14 |
- conn->initiator_name, (int)difftime(now, start)); |
15 |
+ ISTGT_WARNLOG("Operation timed out (%s,time=%.0f)\n", |
16 |
+ conn->initiator_name, difftime(now, start)); |
17 |
conn->state = CONN_STATE_EXITING; |
18 |
} else { |
19 |
- ISTGT_ERRLOG("iscsi_read() failed (errno=%d,%s,time=%d)\n", |
20 |
- errno, conn->initiator_name, (int)difftime(now, start)); |
21 |
+ ISTGT_ERRLOG("iscsi_read() failed (errno=%d,%s,time=%.0f)\n", |
22 |
+ errno, conn->initiator_name, difftime(now, start)); |
23 |
} |
24 |
return -1; |
25 |
} |
26 |
@@ -762,8 +762,8 @@ |
27 |
rc = readv(conn->sock, &iovec[0], 4); |
28 |
if (rc < 0) { |
29 |
now = time(NULL); |
30 |
- ISTGT_ERRLOG("readv() failed (%d,errno=%d,%s,time=%d)\n", |
31 |
- rc, errno, conn->initiator_name, (int)difftime(now, start)); |
32 |
+ ISTGT_ERRLOG("readv() failed (%d,errno=%d,%s,time=%.0f)\n", |
33 |
+ rc, errno, conn->initiator_name, difftime(now, start)); |
34 |
return -1; |
35 |
} |
36 |
if (rc == 0) { |
37 |
@@ -1257,8 +1257,8 @@ |
38 |
rc = writev(conn->sock, &iovec[0], 5); |
39 |
if (rc < 0) { |
40 |
now = time(NULL); |
41 |
- ISTGT_ERRLOG("writev() failed (errno=%d,%s,time=%d)\n", |
42 |
- errno, conn->initiator_name, (int)difftime(now, start)); |
43 |
+ ISTGT_ERRLOG("writev() failed (errno=%d,%s,time=%.0f)\n", |
44 |
+ errno, conn->initiator_name, difftime(now, start)); |
45 |
return -1; |
46 |
} |
47 |
nbytes -= rc; |
48 |
@@ -3590,9 +3590,9 @@ |
49 |
if (rc < 0) { |
50 |
now = time(NULL); |
51 |
ISTGT_ERRLOG("MCS: CmdSN(%u) error ExpCmdSN=%u " |
52 |
- "(time=%d)\n", |
53 |
+ "(time=%.0f)\n", |
54 |
CmdSN, conn->sess->ExpCmdSN, |
55 |
- (int)difftime(now, start)); |
56 |
+ difftime(now, start)); |
57 |
SESS_MTX_UNLOCK(conn); |
58 |
return -1; |
59 |
} |
60 |
--- src/istgt_lu_disk.c.orig 2012-10-28 00:26:36.000000000 +0200 |
61 |
+++ src/istgt_lu_disk.c 2013-06-26 00:44:05.000000000 +0200 |
62 |
@@ -5288,9 +5288,9 @@ |
63 |
MTX_UNLOCK(&lu_task->trans_mutex); |
64 |
now = time(NULL); |
65 |
ISTGT_ERRLOG("timeout trans_cond CmdSN=%u " |
66 |
- "(time=%d)\n", |
67 |
+ "(time=%.0f)\n", |
68 |
lu_task->lu_cmd.CmdSN, |
69 |
- (int)difftime(now, start)); |
70 |
+ difftime(now, start)); |
71 |
/* timeout */ |
72 |
return -1; |
73 |
} |
74 |
@@ -5326,8 +5326,8 @@ |
75 |
if (rc == ETIMEDOUT) { |
76 |
lu_task->error = 1; |
77 |
now = time(NULL); |
78 |
- ISTGT_ERRLOG("timeout trans_cond CmdSN=%u (time=%d)\n", |
79 |
- lu_task->lu_cmd.CmdSN, (int)difftime(now, start)); |
80 |
+ ISTGT_ERRLOG("timeout trans_cond CmdSN=%u (time=%.0f)\n", |
81 |
+ lu_task->lu_cmd.CmdSN, difftime(now, start)); |
82 |
return -1; |
83 |
} |
84 |
lu_task->error = 1; |