Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130471
b: refs/heads/master
c: da505c3
h: refs/heads/master
i:
  130469: 54059b0
  130467: b928c99
  130463: bcd2f0e
v: v3
  • Loading branch information
Steve French committed Jan 29, 2009
1 parent 4e0d0ef commit 2d7e1b6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f818dd55c4a8b3519e203900bde0bb780d36e799
refs/heads/master: da505c386c9f993e43861791dae339b2219cf8dd
4 changes: 2 additions & 2 deletions trunk/fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ ipv4_connect(struct TCP_Server_Info *server)
* user space buffer
*/
socket->sk->sk_rcvtimeo = 7 * HZ;
socket->sk->sk_sndtimeo = 3 * HZ;
socket->sk->sk_sndtimeo = 5 * HZ;

/* make the bufsizes depend on wsize/rsize and max requests */
if (server->noautotune) {
Expand Down Expand Up @@ -1953,7 +1953,7 @@ ipv6_connect(struct TCP_Server_Info *server)
* user space buffer
*/
socket->sk->sk_rcvtimeo = 7 * HZ;
socket->sk->sk_sndtimeo = 3 * HZ;
socket->sk->sk_sndtimeo = 5 * HZ;
server->ssocket = socket;

return rc;
Expand Down
20 changes: 19 additions & 1 deletion trunk/fs/cifs/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,25 @@ smb_sendv(struct TCP_Server_Info *server, struct kvec *iov, int n_vec)
n_vec - first_vec, total_len);
if ((rc == -ENOSPC) || (rc == -EAGAIN)) {
i++;
if (i >= 14) {
/* if blocking send we try 3 times, since each can block
for 5 seconds. For nonblocking we have to try more
but wait increasing amounts of time allowing time for
socket to clear. The overall time we wait in either
case to send on the socket is about 15 seconds.
Similarly we wait for 15 seconds for
a response from the server in SendReceive[2]
for the server to send a response back for
most types of requests (except SMB Write
past end of file which can be slow, and
blocking lock operations). NFS waits slightly longer
than CIFS, but this can make it take longer for
nonresponsive servers to be detected and 15 seconds
is more than enough time for modern networks to
send a packet. In most cases if we fail to send
after the retries we will kill the socket and
reconnect which may clear the network problem.
*/
if ((i >= 14) || (!server->noblocksnd && (i > 2))) {
cERROR(1,
("sends on sock %p stuck for 15 seconds",
ssocket));
Expand Down

0 comments on commit 2d7e1b6

Please sign in to comment.