lkml.org 
[lkml]   [2006]   [Mar]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 21 Mar 2006 15:13:04 -0800
FromAndrew Morton <>
SubjectRe: [patch] direct-io: bug fix in dio handling write error
Badari Pulavarty <pbadari@us.ibm.com> wrote:
>
> If some one asks to do IO for 128K and if we get -EIO after say, 64K 
> - we fail the whole IO  with -EIO ?

A multiple-block direct-IO can complete those blocks (actually the BIOs) in
any order.  How do we communicate to userspace that segments 0, 1, 3 and 5
completed OK, but segments 2 and 4 had errors?

The best we could do is to tell userspace that 0 and 1 completed and ignore
everything after the first I/O error.

But I don't think it's worth the effort.  Simply returning EIO for the
whole thing is probably good enough.  The only situation I can think of
where someone would care down to that level of detail is a specialised
recover-data-from-a-bad-disk application (for which direct-io would be a
good tool).  Such an application should have the brains to go
sector-at-a-time if larger I/O's throw errors.

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

\
 
 \ /
  Last update: 2006-03-21 23:13    [from the cache]
©2003-2008