diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-07-19 01:48:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 10:04:44 -0700 |
commit | cf914a7d656e62b9dd3e0dffe4f62b953ae6048d (patch) | |
tree | baf7e79de006ca80eac426d2d1be4c52f5f19624 /mm/filemap.c | |
parent | fe3cba17c49471e99d3421e675fc8b3deaaf0b70 (diff) | |
download | linux-cf914a7d656e62b9dd3e0dffe4f62b953ae6048d.tar.gz linux-cf914a7d656e62b9dd3e0dffe4f62b953ae6048d.tar.bz2 linux-cf914a7d656e62b9dd3e0dffe4f62b953ae6048d.zip |
readahead: split ondemand readahead interface into two functions
Split ondemand readahead interface into two functions. I think this makes it
a little clearer for non-readahead experts (like Rusty).
Internally they both call ondemand_readahead(), but the page argument is
changed to an obvious boolean flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 5eb0a6b9d607..49a6fe375d01 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -894,15 +894,15 @@ void do_generic_mapping_read(struct address_space *mapping, find_page: page = find_get_page(mapping, index); if (!page) { - page_cache_readahead_ondemand(mapping, - &ra, filp, page, + page_cache_sync_readahead(mapping, + &ra, filp, index, last_index - index); page = find_get_page(mapping, index); if (unlikely(page == NULL)) goto no_cached_page; } if (PageReadahead(page)) { - page_cache_readahead_ondemand(mapping, + page_cache_async_readahead(mapping, &ra, filp, page, index, last_index - index); } @@ -1348,14 +1348,14 @@ retry_find: */ if (VM_SequentialReadHint(vma)) { if (!page) { - page_cache_readahead_ondemand(mapping, ra, file, page, + page_cache_sync_readahead(mapping, ra, file, vmf->pgoff, 1); page = find_lock_page(mapping, vmf->pgoff); if (!page) goto no_cached_page; } if (PageReadahead(page)) { - page_cache_readahead_ondemand(mapping, ra, file, page, + page_cache_async_readahead(mapping, ra, file, page, vmf->pgoff, 1); } } |