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 /include/linux/mm.h | |
parent | fe3cba17c49471e99d3421e675fc8b3deaaf0b70 (diff) | |
download | op-kernel-dev-cf914a7d656e62b9dd3e0dffe4f62b953ae6048d.zip op-kernel-dev-cf914a7d656e62b9dd3e0dffe4f62b953ae6048d.tar.gz |
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 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 3d0d7d2..50a0ed1 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1138,12 +1138,20 @@ int do_page_cache_readahead(struct address_space *mapping, struct file *filp, pgoff_t offset, unsigned long nr_to_read); int force_page_cache_readahead(struct address_space *mapping, struct file *filp, pgoff_t offset, unsigned long nr_to_read); -unsigned long page_cache_readahead_ondemand(struct address_space *mapping, - struct file_ra_state *ra, - struct file *filp, - struct page *page, - pgoff_t offset, - unsigned long size); + +void page_cache_sync_readahead(struct address_space *mapping, + struct file_ra_state *ra, + struct file *filp, + pgoff_t offset, + unsigned long size); + +void page_cache_async_readahead(struct address_space *mapping, + struct file_ra_state *ra, + struct file *filp, + struct page *pg, + pgoff_t offset, + unsigned long size); + unsigned long max_sane_readahead(unsigned long nr); /* Do stack extension */ |