mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Steffen Persvold <sp@scali.no>
Cc: lkml <linux-kernel@vger.kernel.org>,
	nfs list <nfs@lists.sourceforge.net>,
	Neil Brown <neilb@cse.unsw.edu.au>
Subject: Re: 2.4.8 NFS Problems
Date: Thu, 20 Dec 2001 21:27:31 +0100	[thread overview]
Message-ID: <15394.18867.426834.102550@charged.uio.no> (raw)
In-Reply-To: <3C21F863.5278841A@scali.no>
In-Reply-To: <3C21B30D.871B6BE4@scali.no> <15393.51009.856041.463215@charged.uio.no> <3C21F863.5278841A@scali.no>

>>>>> " " == 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);


  parent reply	other threads:[~2001-12-20 20:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-20  9:44 Steffen Persvold
2001-12-20 11:10 ` Trond Myklebust
2001-12-20 14:40   ` Steffen Persvold
2001-12-20 20:27   ` Trond Myklebust [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-09-05 11:56 Mike Black
2001-09-07 11:49 ` Trond Myklebust
2001-09-07 12:05   ` Peter T. Breuer
2001-09-07 12:27   ` Trond Myklebust
2001-09-07 12:36   ` Trond Myklebust
2001-09-07 13:13   ` Mike Black
2001-09-07 14:42   ` Trond Myklebust
2001-09-07 15:46     ` Mike Black
2001-09-08 10:53     ` Trond Myklebust
2001-09-08 11:53       ` Mike Black

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15394.18867.426834.102550@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    --cc=nfs@lists.sourceforge.net \
    --cc=sp@scali.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®