]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Thu, 2 Feb 2006 04:15:57 +0000 (20:15 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 2 Feb 2006 04:15:57 +0000 (20:15 -0800)
fs/cifs/connect.c
fs/cifs/file.c
fs/cifs/transport.c

index 88f60aa520584a87acab13422d22940063f2b536..e488603fb1e77f29c601e7892d6f683d9e43b804 100644 (file)
@@ -1785,7 +1785,16 @@ 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_t(const int, 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 */
index 77c990f0cb981706c55dcd936958c654d8f543e5..d17c97d07c80e44895503e6d336b8328c0ffd348 100644 (file)
@@ -1190,7 +1190,6 @@ retry:
                                        /* BB what if continued retry is
                                           requested via mount flags? */
                                        set_bit(AS_EIO, &mapping->flags);
-                                       SetPageError(page);
                                } else {
                                        cifs_stats_bytes_written(cifs_sb->tcon,
                                                                 bytes_written);
@@ -1198,6 +1197,13 @@ retry:
                        }
                        for (i = 0; i < n_iov; i++) {
                                page = pvec.pages[first + i];
+                               /* Should we also set page error on
+                               success rc but too little data written? */
+                               /* BB investigate retry logic on temporary
+                               server crash cases and how recovery works
+                               when page marked as error */ 
+                               if(rc)
+                                       SetPageError(page);
                                kunmap(page);
                                unlock_page(page);
                                page_cache_release(page);
index 7b98792150ea7ebba3d449e994906483dcadf4a3..b12cb8a7da7c87ec2fe01561dd1e5891f674c1ec 100644 (file)
@@ -498,7 +498,6 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
                        else
                                *pRespBufType = CIFS_SMALL_BUFFER;
                        iov[0].iov_len = receive_len + 4;
-                       iov[1].iov_len = 0;
 
                        dump_smb(midQ->resp_buf, 80);
                        /* convert the length into a more usable form */