Re: NFSv3 and linux-2.4.10-ac3 => oops

Trond Myklebust (trond.myklebust@fys.uio.no)
Tue, 2 Oct 2001 14:03:23 +0200


>>>>> " " == Matt Bernstein <matt@theBachChoir.org.uk> writes:

> I wonder if this is related to oopses I sent in in the last two
> days? We're running 4GB setups with NFSv3 client and server on
> our fileservers, and the oopses might (don't really have strong
> correlation evidence yet) be related to when our fileservers
> push online backups to cheaper NFS servers (running the same
> kernel based on 2.4.9-ac10). Is there a last known good kernel
> I can try on my production systems while I try to reproduce the
> problem on smaller boxes? Or would you like me to try your
> patch?

Linus changed nfs_prepare_write() in his tree around 2.4.10-pre5. From
what I can see, Alan merged that particular patch into 2.4.9-ac11 (but
without merging in the related changes to linux/mm/filemap.c).

Argh. I see that in the patch I put out earlier today, I forgot to
also revert the removal of the kunmap() in nfs_commit_write() (sorry -
my coffee was particularly weak this morning).

Please apply the following patch to the 'ac' tree instead.

People who use Linus' tree should *not* apply this patch!!!!!

Cheers,
Trond

diff -u --recursive --new-file linux-2.4.10-reclaim/fs/nfs/file.c linux-2.4.10-ac4/fs/nfs/file.c
--- linux-2.4.10-reclaim/fs/nfs/file.c Sun Sep 23 18:48:01 2001
+++ linux-2.4.10-ac4/fs/nfs/file.c Tue Oct 2 13:40:58 2001
@@ -155,7 +155,12 @@
*/
static int nfs_prepare_write(struct file *file, struct page *page, unsigned offset, unsigned to)
{
- return nfs_flush_incompatible(file, page);
+ int status;
+ kmap(page);
+ status = nfs_flush_incompatible(file, page);
+ if (status)
+ kunmap(page);
+ return status;
}

static int nfs_commit_write(struct file *file, struct page *page, unsigned offset, unsigned to)
@@ -164,6 +169,7 @@
loff_t pos = ((loff_t)page->index<<PAGE_CACHE_SHIFT) + to;
struct inode *inode = page->mapping->host;

+ kunmap(page);
lock_kernel();
status = nfs_updatepage(file, page, offset, to-offset);
unlock_kernel();
-
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/