Re: ATA Write Error and Time-out Notification in User Space

From: Drew Winstel
Date: Tue Dec 20 2005 - 19:31:14 EST


Hi Alan,

On Tuesday, December 20, 2005 16:50, Alan Cox wrote:
> On Maw, 2005-12-20 at 15:55 -0600, John Treubig wrote:
> > Where would I look in the LibATA/SCSI chain to permit Write Error and
> > Time-out notification to be passed back to user space without hanging the
> > system?
>
> Some background first:
>
> The 2.6 block layer can generally handle passing errors back up. It has
> a load of problems with EOF on media that is variable size but block
> that need fixing but the fundamental errors get back to the block layer.
>
> Unfortunately although they get back to the block request the full error
> is not propogated further up the stack. Thats actually tricky for the
> general file system case as I/O as asynchronous to the actual file
> system accesses and we may even hit errors on pages we didn't actually
> need.
>
> One result of that is that on write errors we generally mark a volume
> offline and processes accessing it get stuck.
>

With the application that John is using (namely, it delivers reads and writes
directly to the drive via various SG ioctls), the file system is not an
issue, hence wanting the errors to be returned to userspace.

I presume this means that John would have to look at the block level error
handling as opposed to the SCSI level?

<snip>

Drew
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/