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

Joe Korty (joe.korty@ccur.com)
Tue, 1 Apr 2003 17:10:33 -0500


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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/