All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luben Tuikov <ltuikov@yahoo.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Tony Battersby <tonyb@cybernetics.com>
Cc: "Salyzyn, Mark" <Mark_Salyzyn@adaptec.com>
Subject: Re: [PATCH] [SCSI] sd: make error handling more robust (v2)
Date: Fri, 1 Feb 2008 12:13:18 -0800 (PST)	[thread overview]
Message-ID: <794098.69073.qm@web31807.mail.mud.yahoo.com> (raw)
In-Reply-To: <47A350DF.5020404@cybernetics.com>

--- On Fri, 2/1/08, Tony Battersby <tonyb@cybernetics.com> wrote:

> From: Tony Battersby <tonyb@cybernetics.com>
> Subject: [PATCH] [SCSI] sd: make error handling more robust (v2)
> To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>, "James Bottomley" <James.Bottomley@HansenPartnership.com>
> Cc: "Luben Tuikov" <ltuikov@yahoo.com>, "Salyzyn, Mark" <Mark_Salyzyn@adaptec.com>
> Date: Friday, February 1, 2008, 9:03 AM
> This patch fixes a problem with some out-of-spec SCSI disks
> that report
> hardware or medium errors incorrectly.  Without the patch,
> the kernel
> may silently ignore a failed write command or return
> corrupted data on a
> failed read command.
> 
> Signed-off-by: Tony Battersby <tonyb@cybernetics.com>

Acked-by: Luben Tuikov <ltuikov@yahoo.com>

> ---
> 
> This is a simplified version of the original patch that

Very simplified. ;-)

> fixes just the
> problem at hand, without trying to handle other theoretical
> out-of-spec
> cases.

Yes, it is chunk #2 of the patch I sent to you to
try on your hardware.

> 
> Applies to kernels 2.6.18 - 2.6.24-git10+.
> 
> --- linux-2.6.24-git10/drivers/scsi/sd.c.orig	2008-02-01
> 11:24:37.000000000 -0500
> +++ linux-2.6.24-git10/drivers/scsi/sd.c	2008-02-01
> 11:26:12.000000000 -0500
> @@ -990,6 +990,8 @@ static int sd_done(struct scsi_cmnd
> *SCp
>  		/* This computation should always be done in terms of
>  		 * the resolution of the device's medium.
>  		 */
> +		if (bad_lba < start_lba)
> +			goto out;
>  		good_bytes = (bad_lba -
> start_lba)*SCpnt->device->sector_size;
>  		break;
>  	case RECOVERED_ERROR:
> 
> 
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-02-01 20:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01 17:03 [PATCH] [SCSI] sd: make error handling more robust (v2) Tony Battersby
2008-02-01 20:13 ` Luben Tuikov [this message]
2008-02-01 20:47 ` Salyzyn, Mark
2008-02-02  0:43   ` Mike Snitzer
2008-02-02 20:24     ` Greg KH
2008-02-02 20:56       ` Mike Snitzer
2008-02-02 21:08         ` Greg KH
2008-02-02 22:06 ` James Bottomley
2008-02-03 15:14   ` Mike Snitzer
2008-02-04  9:14     ` Luben Tuikov
2008-02-06 21:54       ` [PATCH 1/1] aacraid: do not set valid bit in sense information Salyzyn, Mark
2008-02-06 22:19         ` Luben Tuikov
2008-02-04  9:11   ` [PATCH] [SCSI] sd: make error handling more robust (v2) Luben Tuikov
2008-02-04 21:22     ` James Bottomley
2008-02-04 23:23       ` Luben Tuikov

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=794098.69073.qm@web31807.mail.mud.yahoo.com \
    --to=ltuikov@yahoo.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=Mark_Salyzyn@adaptec.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tonyb@cybernetics.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.