[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1372215862.2806.54.camel@dabdike>
Date: Tue, 25 Jun 2013 20:04:22 -0700
From: James Bottomley <James.Bottomley@...senPartnership.com>
To: Mark Lord <mlord@...ox.com>
Cc: Ondrej Zary <linux@...nbow-software.org>,
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 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).
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
--
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