mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Grant Wilson <grant.wilson@zen.co.uk>
Cc: Reuben Farrelly <reuben-lkml@reub.net>,
	Andrew Morton <akpm@osdl.org>,
	Helge Hafting <helgehaf@aitel.hist.no>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Neil Brown <neilb@suse.de>
Subject: Re: 2.6.17-mm5 dislikes raid-1, just like mm4
Date: Sun, 02 Jul 2006 10:06:28 -0500	[thread overview]
Message-ID: <1151852788.3558.10.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <44A7D82A.80909@zen.co.uk>

On Sun, 2006-07-02 at 15:28 +0100, Grant Wilson wrote:
> With the patch applied to 2.6.17-mm5 my RAID-1 is up and running on both
> SATA drives with no problems.

That's great, thanks.  Now we know what the problem patch is, I'd like
to try an 11th our correction of the logic fault in the original.  Could
you try this patch against original -mm (by reversing the previous
patch).  I think it should correct the problem?

Thanks,

James

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index bf5191f..08af9aa 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -920,22 +920,20 @@ void scsi_io_completion(struct scsi_cmnd
 	 * Next deal with any sectors which we were able to correctly
 	 * handle.
 	 */
-	if (good_bytes > 0) {
-		SCSI_LOG_HLCOMPLETE(1, printk("%ld sectors total, "
-					      "%d bytes done.\n",
-					      req->nr_sectors, good_bytes));
-		SCSI_LOG_HLCOMPLETE(1, printk("use_sg is %d\n", cmd->use_sg));
-
-		if (clear_errors)
-			req->errors = 0;
-
-		/* A number of bytes were successfully read.  If there
-		 * is leftovers and there is some kind of error
-		 * (result != 0), retry the rest.
-		 */
-		if (scsi_end_request(cmd, 1, good_bytes, !!result) == NULL)
-			return;
-	}
+	SCSI_LOG_HLCOMPLETE(1, printk("%ld sectors total, "
+				      "%d bytes done.\n",
+				      req->nr_sectors, good_bytes));
+	SCSI_LOG_HLCOMPLETE(1, printk("use_sg is %d\n", cmd->use_sg));
+
+	if (clear_errors)
+		req->errors = 0;
+
+	/* A number of bytes were successfully read.  If there
+	 * are leftovers and there is some kind of error
+	 * (result != 0), retry the rest.
+	 */
+	if (scsi_end_request(cmd, 1, good_bytes, result == 0) == NULL)
+		return;
 
 	/* good_bytes = 0, or (inclusive) there were leftovers and
 	 * result = 0, so scsi_end_request couldn't retry.



  reply	other threads:[~2006-07-02 15:06 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060701175444.958D6E00608B@knarzkiste.dyndns.org>
2006-07-01 10:35 ` 2.6.17-mm5 Andrew Morton
2006-07-01 11:08   ` 2.6.17-mm5 Reuben Farrelly
2006-07-01 11:51     ` 2.6.17-mm5 Andrew Morton
2006-07-01 12:31       ` 2.6.17-mm5 Reuben Farrelly
2006-07-01 13:06         ` 2.6.17-mm5 Brice Goglin
2006-07-01 17:00           ` 2.6.17-mm5 Greg KH
2006-07-01 18:03   ` 2.6.17-mm5 Ralf Hildebrandt
2006-07-01 18:14   ` 2.6.17-mm5 dislikes raid-1, just like mm4 Helge Hafting
2006-07-01 22:22     ` Andrew Morton
2006-07-01 22:52       ` Jeff Garzik
2006-07-01 22:58         ` Andrew Morton
2006-07-02  4:43       ` Reuben Farrelly
2006-07-02  6:09         ` Andrew Morton
2006-07-02  5:13       ` Reuben Farrelly
2006-07-02 13:53         ` James Bottomley
2006-07-02 14:28           ` Grant Wilson
2006-07-02 15:06             ` James Bottomley [this message]
2006-07-02 15:43               ` Grant Wilson
2006-07-02 19:07                 ` Helge Hafting
2006-07-03  6:52                   ` Reuben Farrelly
2006-07-02  3:51     ` Tejun Heo
     [not found]   ` <20060701142419.GB28750@tlg.swandive.local>
2006-07-01 21:30     ` 2.6.17-mm5 Andrew Morton
2006-07-01 22:26       ` 2.6.17-mm5 James Bottomley
2006-07-01 22:32         ` 2.6.17-mm5 Neil Brown
2006-07-01 22:56           ` 2.6.17-mm5 Jeff Garzik
2006-07-02  0:10             ` 2.6.17-mm5 James Bottomley
2006-07-01 22:29       ` More RAID / SATA / barrier problems [ Re: 2.6.17-mm5 ] Neil Brown
2006-07-01 22:54       ` 2.6.17-mm5 Jeff Garzik
2006-07-27 21:02       ` 2.6.17-mm5 Ming Zhang
2006-07-02 10:03   ` 2.6.17-mm5 Andy Whitcroft
2006-07-02 10:14     ` 2.6.17-mm5 Andrew Morton
2006-07-02 10:40       ` 2.6.17-mm5 Andy Whitcroft
2006-07-02 11:14         ` 2.6.17-mm5 Andrew Morton
2006-07-03  0:47   ` 2.6.17-mm5 Theodore Tso
2006-07-03  7:32   ` 2.6.17-mm5 Heiko Carstens

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=1151852788.3558.10.camel@mulgrave.il.steeleye.com \
    --to=james.bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=grant.wilson@zen.co.uk \
    --cc=helgehaf@aitel.hist.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=reuben-lkml@reub.net \
    /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®