Re: [BUG] Failed writes marked clean?

From: Linus Torvalds (torvalds@transmeta.com)
Date: Fri Nov 08 2002 - 15:53:56 EST


In article <3DCC1EB5.4020303@google.com>, Ross Biro <rossb@google.com> wrote:
>
>Perhaps I'm reading the code incorrectly, but in kernel versions 2.4.18
>and 2.5.46 it looks to me like in the case of a write, ll_rw_block
>always clears the dirty bit. In the event of an error, nothing resets
>the dirty bit and the uptodate flag is cleared.

Correct.

There's not all that much else it could do. Keeping the dirty bit set is
not an option - that would bring the whole system down on IO errors.

As it is, higher layers that care _can_ figure the IO error out, simply
by noticing that the page is not up-to-date after the write. It's then
totally up to the higher layers (ie user space) to write the thing anew
if it cares about the data.

(In other words: this is why we have fsync() and error codes).

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



This archive was generated by hypermail 2b29 : Fri Nov 15 2002 - 22:00:16 EST