aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-10-10 17:21:15 -0400
committerSteve French <sfrench@us.ibm.com>2005-10-10 17:21:15 -0400
commitb387eaeb666f6a5e24990a1f4d6a0447ae14315d (patch)
treecf79a1fe2e47e599b3ec8cf0ea1b56b3f9c1cf58 /fs/cifs/connect.c
parent5e1253b50111220f06ee13bc4e555d89ff39176b (diff)
[CIFS] Do not shrink tcp sndbuf/rcvbuf from their defaults
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index d1c6acee620e..177289771abe 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -189,7 +189,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
189 server->server_RFC1001_name); 189 server->server_RFC1001_name);
190 } 190 }
191 if(rc) { 191 if(rc) {
192 cERROR(1,("reconnect error %d",rc)); 192 cFYI(1,("reconnect error %d",rc));
193 msleep(3000); 193 msleep(3000);
194 } else { 194 } else {
195 atomic_inc(&tcpSesReconnectCount); 195 atomic_inc(&tcpSesReconnectCount);
@@ -471,7 +471,6 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
471 } else { 471 } else {
472 /* give server a second to 472 /* give server a second to
473 clean up before reconnect attempt */ 473 clean up before reconnect attempt */
474 cERROR(1,("sleep before reconnect"));
475 msleep(1000); 474 msleep(1000);
476 /* always try 445 first on reconnect 475 /* always try 445 first on reconnect
477 since we get NACK on some if we ever 476 since we get NACK on some if we ever
@@ -558,8 +557,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
558 557
559 dump_smb(smb_buffer, length); 558 dump_smb(smb_buffer, length);
560 if (checkSMB (smb_buffer, smb_buffer->Mid, total_read+4)) { 559 if (checkSMB (smb_buffer, smb_buffer->Mid, total_read+4)) {
561 cERROR(1, ("Bad SMB Received ")); 560 cifs_dump_mem("Bad SMB: ", smb_buffer, 48);
562 cifs_dump_mem("smb: ", smb_buffer, 48);
563 continue; 561 continue;
564 } 562 }
565 563
@@ -1386,12 +1384,16 @@ ipv4_connect(struct sockaddr_in *psin_server, struct socket **csocket,
1386 /* Eventually check for other socket options to change from 1384 /* Eventually check for other socket options to change from
1387 the default. sock_setsockopt not used because it expects 1385 the default. sock_setsockopt not used because it expects
1388 user space buffer */ 1386 user space buffer */
1387 cFYI(1,("sndbuf %d rcvbuf %d rcvtimeo 0x%lx",(*csocket)->sk->sk_sndbuf,
1388 (*csocket)->sk->sk_rcvbuf, (*csocket)->sk->sk_rcvtimeo));
1389 (*csocket)->sk->sk_rcvtimeo = 7 * HZ; 1389 (*csocket)->sk->sk_rcvtimeo = 7 * HZ;
1390 cERROR(1,("sndbuf %d rcvbuf %d reset to 200K each",(*csocket)->sk->sk_sndbuf, (*csocket)->sk->sk_rcvbuf)); 1390 /* make the bufsizes depend on wsize/rsize and max requests */
1391 (*csocket)->sk->sk_sndbuf = 300 * 1024; 1391 if((*csocket)->sk->sk_sndbuf < (200 * 1024))
1392 (*csocket)->sk->sk_rcvbuf = 200 * 1024; 1392 (*csocket)->sk->sk_sndbuf = 200 * 1024;
1393 /* send RFC1001 sessinit */ 1393 if((*csocket)->sk->sk_rcvbuf < (140 * 1024))
1394 (*csocket)->sk->sk_rcvbuf = 140 * 1024;
1394 1395
1396 /* send RFC1001 sessinit */
1395 if(psin_server->sin_port == htons(RFC1001_PORT)) { 1397 if(psin_server->sin_port == htons(RFC1001_PORT)) {
1396 /* some servers require RFC1001 sessinit before sending 1398 /* some servers require RFC1001 sessinit before sending
1397 negprot - BB check reconnection in case where second 1399 negprot - BB check reconnection in case where second