From f67eb436691b9af38d8477ca10b90488bd477f88 Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 24 Jan 2006 20:26:48 -0800 Subject: [PATCH] --- yaml --- r: 19482 b: refs/heads/master c: 17cbbafe8e82bde4258e407ce043b61f4f9a350f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/connect.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 5e54b8d758ee..2ecc4992e071 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4c8af5254e741983e141e10002e01abba87f8419 +refs/heads/master: 17cbbafe8e82bde4258e407ce043b61f4f9a350f diff --git a/trunk/fs/cifs/connect.c b/trunk/fs/cifs/connect.c index 88f60aa52058..eae306fa24b2 100644 --- a/trunk/fs/cifs/connect.c +++ b/trunk/fs/cifs/connect.c @@ -1785,7 +1785,15 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, } else if(volume_info.wsize) cifs_sb->wsize = volume_info.wsize; else - cifs_sb->wsize = CIFSMaxBufSize; /* default */ + cifs_sb->wsize = + min(PAGEVEC_SIZE * PAGE_CACHE_SIZE, 127*1024); + /* old default of CIFSMaxBufSize was too small now + that SMB Write2 can send multiple pages in kvec. + RFC1001 does not describe what happens when frame + bigger than 128K is sent so use that as max in + conjunction with 52K kvec constraint on arch with 4K + page size */ + if(cifs_sb->rsize < PAGE_CACHE_SIZE) { cifs_sb->rsize = PAGE_CACHE_SIZE; /* Windows ME does this */