Skip to contentSkip to conversation

why clear_buffer_uptodate in end_buffer_write_sync on write error?

DISCUSSION Robert W. Fuller 1 participant 2 messages Jan 3, 2005

lore
Share & tools
lore
#0 lore raw

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?

#1 lore raw

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?

Quoted 7 lines · Robert W. Fuller

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/