linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ondrej Zary <linux@rainbow-software.org>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Mark Lord <mlord@pobox.com>, Pavel Machek <pavel@ucw.cz>,
	Marcus Overhagen <marcus.overhagen@gmail.com>,
	kernel list <linux-kernel@vger.kernel.org>,
	linux-ide@vger.kernel.org, tj@kernel.org
Subject: Re: SATA hdd refuses to reallocate a sector?
Date: Wed, 26 Jun 2013 08:11:15 +0200	[thread overview]
Message-ID: <201306260811.15421.linux@rainbow-software.org> (raw)
In-Reply-To: <1372215862.2806.54.camel@dabdike>

On Wednesday 26 June 2013, James Bottomley wrote:
> On Mon, 2013-06-24 at 08:18 -0400, Mark Lord wrote:
> > And the SCSI stack in Linux has rather atrocious error handling.
> > It lumps multiple requests together, and can fail the entire lot even
> > if only a single sector is bad.
>
> That's rather misleading.  SCSI doesn't lump anything together; it
> handles the requests it was passed.  For reads and writes through the
> page cache, block will aggregate in the elevators, but you avoid that by
> not using the page cache (O_DIRECT or SG_IO).

Yes, it works fine with O_DIRECT - that's why hdd_realloc reads 
sector-by-sector when an error was detected. I'd also like to disable read 
retries but that does not seem to be possible.

> For devices which report failing sectors correctly data up to the failed
> sector is returned and the request is shortened and retried from the
> failed sector on.  If we get a second failure at the beginning (where
> the previous bad sector was), then we give up.
>
> James


-- 
Ondrej Zary

  reply	other threads:[~2013-06-26  6:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-23 10:19 SATA hdd refuses to reallocate a sector? Pavel Machek
2013-06-23 11:21 ` Pavel Machek
2013-06-23 13:16   ` Marcus Overhagen
2013-06-23 19:00     ` Pavel Machek
2013-06-23 21:27       ` Mark Lord
2013-06-23 21:51         ` Pavel Machek
2013-06-23 22:35           ` Mark Lord
2013-06-24  6:19             ` Marcus Overhagen
2013-06-24 12:28               ` Pavel Machek
2013-06-24  7:14           ` Ondrej Zary
2013-06-24 11:06             ` Pavel Machek
2013-06-24 12:18             ` Mark Lord
2013-06-26  3:04               ` James Bottomley
2013-06-26  6:11                 ` Ondrej Zary [this message]
2013-06-29 18:47             ` Henrique de Moraes Holschuh
2013-06-29 23:02               ` Mark Lord
2013-06-30 14:34                 ` Henrique de Moraes Holschuh
2013-06-30 16:49                   ` Pavel Machek
2013-07-01 13:28                     ` Henrique de Moraes Holschuh
2015-04-30 19:01         ` Pavel Machek
2013-06-24 12:48 ` Zdenek Kaspar
2013-06-24 13:08   ` Ondrej Zary

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=201306260811.15421.linux@rainbow-software.org \
    --to=linux@rainbow-software.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcus.overhagen@gmail.com \
    --cc=mlord@pobox.com \
    --cc=pavel@ucw.cz \
    --cc=tj@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).