Re: NFS got stuck on 2.3.22

Trond Myklebust (trond.myklebust@fys.uio.no)
Thu, 21 Oct 1999 22:23:51 +0200 (CEST)


Hang on a bit. Think I'm starting to get an idea of what's going on:
Could you test the following patch please? It's not a fix, just a
quick test...

If this turns out to fix your problem, then we're going to fix the
'invalidate_inode_pages()' in mm/filemap.c, not the NFS read/write
code.

The problem is that invalidate_inode_page() should NOT be waiting on
the page lock!

Apart from the fact of there being absolutely no point in invalidating
a page that is in the process of being updated, it seriously breaks
the NFS writepage() code. If people want to invalidate all pages of
the entire file, they can use truncate_inode_pages(inode,0).

Cheers,
Trond

--- fs/nfs/read.c.orig Mon Jul 19 21:29:29 1999
+++ fs/nfs/read.c Thu Oct 21 22:13:08 1999
@@ -144,7 +144,6 @@
if (result < PAGE_SIZE) {
memset((char *) address + result, 0, PAGE_SIZE - result);
}
- nfs_refresh_inode(req->ra_inode, &req->ra_fattr);
SetPageUptodate(page);
succ++;
} else {
@@ -157,6 +156,8 @@
free_page(address);

rpc_release_task(task);
+ if (result >= 0)
+ nfs_refresh_inode(req->ra_inode, &req->ra_fattr);
kfree(req);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/