Re: [RFD] What error should FS return when I/O failure occurs?

From: fs
Date: Tue May 17 2005 - 00:01:38 EST


On Mon, 2005-05-16 at 18:54, Coywolf Qi Hunt wrote:

> Two kinds of HW failure,
>
> 1. still readable, only write failure.
> 2. unreadable, unwriteable.
>
> For the first case, if mount option errors=remount-ro is given or implied,
> EROFS is appropriate, otherwise EIO. For the second case, always EIO.
>
> The current VFS design does not try to hide the problems from its
> underlying fs'.
> No need to make it transparent. Userland programs need to consider
> both EROFS and EIO.
What you said is based on the FS implementor's perspective.
But from user's perspective, they open a file with O_RDWR, get a
success, then write returns EROFS?
Besides, EXT3 ALWAYS return EROFS for the 1st and 2nd case, even
you specify errors=continue, things are still the same.

regards,
----
Qu Fuping


-
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/