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

fs
2005-05-17T04:58:10Z

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