Re: Unnecessary barrier in sync_page()?

From: Andrew Morton
Date: Wed Jul 07 2004 - 17:25:06 EST


Andrea Arcangeli <andrea@xxxxxxx> wrote:
>
> 'm thinking, does handle_write_error() holds a ref on the inode? that's
> the VM and it finds the page without passing through the inode. I'm
> afraid the VM isn't safe calling lock_page, or am I overlooking
> something here?

Yes, that's buggy - the caller has a ref on the page, but not on the inode.

I'm not sure what's worth doing in there - maybe just trylock it and if
that fails, lose the I/O error. Combine that with propagation of the page
error flags into the address_space within truncate_complete_page() and
invalidate_complete_page() and in shrink_list(). Does that cover
everything?

Or just kill handle_write_error() altogether and push the responsibility
for setting the address_space error bits into writepage() -
block_write_full_page() and mpage_writepage() do it already.

Let me think about it a bit.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/