[lkml]   [2005]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[RFD] What error should FS return when I/O failure occurs?
Hi, ML subscribers,

I'm taking part in the project DOUBT[1], and my sub-project
focuses on the consistency and coherency of FS[2].
There is something I'm still confused - What error should FS
return when I/O failure occurs? It seems there are no relevant
documents or standards on this issue.

I'll just show some examples to make things clear:
1. For EXT3 partition , we mount it as RW, but when I/O occurs, the
I/O related functions return EROFS(ReadOnly?), while other FSes
return EIO.
2. Assume a program doing the following: open - write(async) - close
When user-mode app calls sys_write, for EXT2/JFS, no error
returns, for EXT3, EROFS returns, for XFS/ReiserFS, EIO returns.

I know each FS has its own implementation, but from users'
perspective, they don't care what FS they're using. So, when
handling errors from syscall, they can't do the following(p-code):
ret = sys_write(fd, buf, size);
if(ret < 0){
/* the following is I/O failure related. */
if((IsEXT3() && errno == EROFS) ||
((IsXFS() || IsReiserFS()) && errno == EIO)){
/* do some things about I/O failure */
When I/O failure occurs, there should be some standards which
define the ONLY error that should be returned from VFS, right?
What they should do is (p-code):
ret = sys_write(fd, buf, size);
if(ret < 0){
if(errno == EIO){


Qu Fuping

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-05-16 08:10    [W:0.050 / U:0.160 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site