Re: Clear PG_error before reading a page

From: Nick Piggin
Date: Wed May 16 2007 - 11:49:20 EST


Johann Lombardi wrote:
On Tue, May 15, 2007 at 02:23:39PM -0700, Andrew Morton wrote:

If get_block() failed then we don't know what blocks to read to
bring this page uptodate, so the pagecache page should remain in state
!PageUptodate(), !PageError(). But then, we shouldn't have populated
pagecache at that offset at all.


Yes, indeed. do_generic_mapping_read() doesn't populate the pagecache if an
error occurred.
Still, __do_page_cache_readahead()->read_pages()->ext3_readpages()->mpage_readpages()
does populate the pagecache even if the page reads failed.

Doesn't really matter. If the read failed then the page is not uptodate.
If it didn't, then it isn't error.

--
SUSE Labs, Novell Inc.
-
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/