include/linux/mm.h | 0 linux-2.6-npiggin/mm/filemap.c | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) diff -puN mm/readahead.c~read-populate mm/readahead.c diff -puN mm/filemap.c~read-populate mm/filemap.c --- linux-2.6/mm/filemap.c~read-populate 2004-05-03 19:56:00.000000000 +1000 +++ linux-2.6-npiggin/mm/filemap.c 2004-05-03 20:51:37.000000000 +1000 @@ -627,6 +627,9 @@ void do_generic_mapping_read(struct addr index = *ppos >> PAGE_CACHE_SHIFT; offset = *ppos & ~PAGE_CACHE_MASK; + force_page_cache_readahead(mapping, filp, index, + max_sane_readahead(desc->count >> PAGE_CACHE_SHIFT)); + for (;;) { struct page *page; unsigned long end_index, nr, ret; @@ -644,7 +647,7 @@ void do_generic_mapping_read(struct addr } cond_resched(); - page_cache_readahead(mapping, ra, filp, index); + page_cache_readahead(mapping, ra, filp, index + desc->count); nr = nr - offset; find_page: diff -puN include/linux/mm.h~read-populate include/linux/mm.h _