Re: NFS write got EIO on kernel starting from 2.4.19-pre4 (or -pre3 maybe)

Joe Korty
2003-04-01T21:59:37Z

On Tue, Apr 01, 2003 at 05:16:24PM +0400, Vladimir Serov wrote:
> Hi Trond,
> Belive or not, I've got another NFS related problem. I'm getting EIO in
> several programs (dd, make) writing relativly large file (several
> megabytes) over NFS. I've tested several kernels to find out where this
> problem was introdused. Here the list:

Hi Vladimir, Everyone,
Try this patch. The bug was introduced in 2.4.20-rc3. It tends to show
up when a slow nfs server is used with a fast client.
Joe

diff -Nur prev/2.4-redhawk/fs/nfs/read.c curr/2.4-redhawk/fs/nfs/read.c
+++ curr/2.4-redhawk/fs/nfs/read.c 2003-04-01 17:04:18.000000000 -0500
+++ curr/2.4-redhawk/fs/nfs/read.c 2003-04-01 17:04:18.000000000 -0500
@@ -424,7 +424,8 @@
memset(p + count, 0, PAGE_CACHE_SIZE - count);
kunmap(page);
count = 0;
- if (data->res.eof)
+ if (data->res.eof
+ || (page_index(page) < (PAGE_CACHE_ALIGN(inode->i_size) >> PAGE_CACHE_SHIFT)))
SetPageUptodate(page);
else
SetPageError(page);