Re: 2.4.8 NFS Problems

Trond Myklebust (trond.myklebust@fys.uio.no)
Thu, 20 Dec 2001 21:27:31 +0100


>>>>> " " == Steffen Persvold <sp@scali.no> writes:

> I can do that, but since one of the clients reporting this
> problem is an Alpha machine running
> 2.2.19 the patch won't do much good (not that the patch is
> architecture dependent, but it's only for
> 2.4.17). Has this patch been there since 2.2 or is it a new
> "feature" in the "stable" #:) 2.4 kernels.

All the problems fixed by the patch should be present in 2.2.19 too. I
don't really have time to backport the whole thing, but I've appended
a backport of the bit that is directly relevant to the EIO error.

Cheers,
Trond

--- linux-2.2.19-up/fs/nfs/read.c.orig Sun Mar 25 18:37:38 2001
+++ linux-2.2.19-up/fs/nfs/read.c Thu Dec 20 21:25:13 2001
@@ -420,7 +420,7 @@
{
struct nfs_read_data *data = (struct nfs_read_data *) task->tk_calldata;
struct inode *inode = data->inode;
- int count = data->res.count;
+ unsigned int count = data->res.count;

dprintk("NFS: %4d nfs_readpage_result, (status %d)\n",
task->tk_pid, task->tk_status);
@@ -431,10 +431,15 @@
struct page *page = req->wb_page;
nfs_list_remove_request(req);

- if (task->tk_status >= 0 && count >= 0) {
+ if (task->tk_status >= 0) {
+ char *p = page_address(page);
+ if (count < PAGE_CACHE_SIZE) {
+ memset(p + count, 0, PAGE_CACHE_SIZE - count);
+ count = 0;
+ } else
+ count -= PAGE_CACHE_SIZE;
flush_dcache_page(page_address(page)); /* Is this correct? */
set_bit(PG_uptodate, &page->flags);
- count -= PAGE_CACHE_SIZE;
} else
set_bit(PG_error, &page->flags);
nfs_unlock_page(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/