]> git.pld-linux.org Git - packages/kernel.git/blob - linux-2.4.18-nfs-default-size.patch
- NFS mounts with the default [rw]size on 2.4.18 pick up the server's max
[packages/kernel.git] / linux-2.4.18-nfs-default-size.patch
1 diff -urNp linux-1380/fs/nfs/inode.c linux-1391/fs/nfs/inode.c
2 --- linux-1380/fs/nfs/inode.c   
3 +++ linux-1391/fs/nfs/inode.c   
4 @@ -418,10 +418,16 @@ nfs_read_super(struct super_block *sb, v
5          }
6  
7         /* Work out a lot of parameters */
8 -       if (data->rsize == 0)
9 +       if (data->rsize == 0) {
10                 server->rsize = nfs_block_size(fsinfo.rtpref, NULL);
11 -       if (data->wsize == 0)
12 +               if (server->rsize > NFS_DEF_FILE_IO_BUFFER_SIZE)
13 +                       server->rsize = NFS_DEF_FILE_IO_BUFFER_SIZE;
14 +       }
15 +       if (data->wsize == 0) {
16                 server->wsize = nfs_block_size(fsinfo.wtpref, NULL);
17 +               if (server->wsize > NFS_DEF_FILE_IO_BUFFER_SIZE)
18 +                       server->wsize = NFS_DEF_FILE_IO_BUFFER_SIZE;
19 +       }
20         /* NFSv3: we don't have bsize, but rather rtmult and wtmult... */
21         if (!fsinfo.bsize)
22                 fsinfo.bsize = (fsinfo.rtmult>fsinfo.wtmult) ? fsinfo.rtmult : fsinfo.wtmult;
This page took 0.032209 seconds and 4 git commands to generate.