aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2012-03-20 05:55:09 -0400
committerSteve French <stevef@smf-gateway.(none)>2012-03-20 11:17:40 -0400
commit10b9b98e41ba248a899f6175ce96ee91431b6194 (patch)
tree8734af1f3e16d1836b2ce16f848828d4ac200f5f /fs/cifs/cifsglob.h
parentce85852b90a214cf577fc1b4f49d99fd7e98784a (diff)
CIFS: Respect negotiated MaxMpxCount
Some servers sets this value less than 50 that was hardcoded and we lost the connection if when we exceed this limit. Fix this by respecting this value - not sending more than the server allows. Cc: stable@kernel.org Reviewed-by: Jeff Layton <jlayton@samba.org> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <stevef@smf-gateway.(none)>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 76e7d8b6da17..d47d20aac670 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -55,14 +55,9 @@
55 55
56/* 56/*
57 * MAX_REQ is the maximum number of requests that WE will send 57 * MAX_REQ is the maximum number of requests that WE will send
58 * on one socket concurrently. It also matches the most common 58 * on one socket concurrently.
59 * value of max multiplex returned by servers. We may
60 * eventually want to use the negotiated value (in case
61 * future servers can handle more) when we are more confident that
62 * we will not have problems oveloading the socket with pending
63 * write data.
64 */ 59 */
65#define CIFS_MAX_REQ 50 60#define CIFS_MAX_REQ 32767
66 61
67#define RFC1001_NAME_LEN 15 62#define RFC1001_NAME_LEN 15
68#define RFC1001_NAME_LEN_WITH_NULL (RFC1001_NAME_LEN + 1) 63#define RFC1001_NAME_LEN_WITH_NULL (RFC1001_NAME_LEN + 1)
@@ -263,6 +258,7 @@ struct TCP_Server_Info {
263 bool session_estab; /* mark when very first sess is established */ 258 bool session_estab; /* mark when very first sess is established */
264 u16 dialect; /* dialect index that server chose */ 259 u16 dialect; /* dialect index that server chose */
265 enum securityEnum secType; 260 enum securityEnum secType;
261 bool oplocks:1; /* enable oplocks */
266 unsigned int maxReq; /* Clients should submit no more */ 262 unsigned int maxReq; /* Clients should submit no more */
267 /* than maxReq distinct unanswered SMBs to the server when using */ 263 /* than maxReq distinct unanswered SMBs to the server when using */
268 /* multiplexed reads or writes */ 264 /* multiplexed reads or writes */