2005-01-03 02:18:34

by Robert W. Fuller

[permalink] [raw]
Subject: why clear_buffer_uptodate in end_buffer_write_sync on write error?

I'm trying to understand the file systems. I'm making good progress,
but I don't get this. If the buffer is marked not up to date because
the write failed, won't this cause block_prepare_write to try and read
the buffer using ll_rw_block thereby overwriting the data that couldn't
be written? Is this desirable? Perhaps I'm confused?


2005-01-03 02:26:04

by Robert W. Fuller

[permalink] [raw]
Subject: Re: why clear_buffer_uptodate in end_buffer_write_sync on write error?

Hmm, ok this makes sense for the sync case, but what about the async
case? Should clear_buffer_uptodate be called in end_buffer_async_write?
How is the error going to be reported to the user, particularly in the
case of a memory mapped file? Shouldn't the system try to write that
page again?

Robert W. Fuller wrote:
> I'm trying to understand the file systems. I'm making good progress,
> but I don't get this. If the buffer is marked not up to date because
> the write failed, won't this cause block_prepare_write to try and read
> the buffer using ll_rw_block thereby overwriting the data that couldn't
> be written? Is this desirable? Perhaps I'm confused?
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>