Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Feb 2, 2006
2 parents 61ee9cd + e6da74e commit 8aeba3c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
11 changes: 10 additions & 1 deletion fs/cifs/connect.c
Expand Up @@ -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 */
Expand Down
8 changes: 7 additions & 1 deletion fs/cifs/file.c
Expand Up @@ -1190,14 +1190,20 @@ static int cifs_writepages(struct address_space *mapping,
/* 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);
}
}
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);
Expand Down
1 change: 0 additions & 1 deletion fs/cifs/transport.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 8aeba3c

Please sign in to comment.