Re: [BUG] Failed writes marked clean?

From: Linus Torvalds (
Date: Fri Nov 08 2002 - 15:53:56 EST

In article <>, Ross Biro <> 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.


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).

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

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