aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-01-24 23:26:48 -0500
committerSteve French <sfrench@us.ibm.com>2006-01-24 23:26:48 -0500
commit17cbbafe8e82bde4258e407ce043b61f4f9a350f (patch)
tree1a79ce7f9febeef296cb6b43144af3f777f83f39
parent4c8af5254e741983e141e10002e01abba87f8419 (diff)
[CIFS] Make cifs default wsize match what we actually want to send (52K
typically - header + 13 pages). Forgetting to set wsize on the mount command costs more than 10% on large write (can be much more) so this makes a saner default. We still shrink this default smaller if server can not support it. Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r--fs/cifs/connect.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 88f60aa5205..eae306fa24b 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1785,7 +1785,15 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
1785 } else if(volume_info.wsize) 1785 } else if(volume_info.wsize)
1786 cifs_sb->wsize = volume_info.wsize; 1786 cifs_sb->wsize = volume_info.wsize;
1787 else 1787 else
1788 cifs_sb->wsize = CIFSMaxBufSize; /* default */ 1788 cifs_sb->wsize =
1789 min(PAGEVEC_SIZE * PAGE_CACHE_SIZE, 127*1024);
1790 /* old default of CIFSMaxBufSize was too small now
1791 that SMB Write2 can send multiple pages in kvec.
1792 RFC1001 does not describe what happens when frame
1793 bigger than 128K is sent so use that as max in
1794 conjunction with 52K kvec constraint on arch with 4K
1795 page size */
1796
1789 if(cifs_sb->rsize < PAGE_CACHE_SIZE) { 1797 if(cifs_sb->rsize < PAGE_CACHE_SIZE) {
1790 cifs_sb->rsize = PAGE_CACHE_SIZE; 1798 cifs_sb->rsize = PAGE_CACHE_SIZE;
1791 /* Windows ME does this */ 1799 /* Windows ME does this */