[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201306260811.15421.linux@rainbow-software.org>
Date: Wed, 26 Jun 2013 08:11:15 +0200
From: Ondrej Zary <linux@...nbow-software.org>
To: James Bottomley <James.Bottomley@...senpartnership.com>
Cc: Mark Lord <mlord@...ox.com>, Pavel Machek <pavel@....cz>,
Marcus Overhagen <marcus.overhagen@...il.com>,
kernel list <linux-kernel@...r.kernel.org>,
linux-ide@...r.kernel.org, tj@...nel.org
Subject: Re: SATA hdd refuses to reallocate a sector?
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists