aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-07-19 04:48:08 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:44 -0400
commitcf914a7d656e62b9dd3e0dffe4f62b953ae6048d (patch)
treebaf7e79de006ca80eac426d2d1be4c52f5f19624 /include/linux/mm.h
parentfe3cba17c49471e99d3421e675fc8b3deaaf0b70 (diff)
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.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 3d0d7d285237..50a0ed1d1806 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,
1138 pgoff_t offset, unsigned long nr_to_read); 1138 pgoff_t offset, unsigned long nr_to_read);
1139int force_page_cache_readahead(struct address_space *mapping, struct file *filp, 1139int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
1140 pgoff_t offset, unsigned long nr_to_read); 1140 pgoff_t offset, unsigned long nr_to_read);
1141unsigned long page_cache_readahead_ondemand(struct address_space *mapping, 1141
1142 struct file_ra_state *ra, 1142void page_cache_sync_readahead(struct address_space *mapping,
1143 struct file *filp, 1143 struct file_ra_state *ra,
1144 struct page *page, 1144 struct file *filp,
1145 pgoff_t offset, 1145 pgoff_t offset,
1146 unsigned long size); 1146 unsigned long size);
1147
1148void page_cache_async_readahead(struct address_space *mapping,
1149 struct file_ra_state *ra,
1150 struct file *filp,
1151 struct page *pg,
1152 pgoff_t offset,
1153 unsigned long size);
1154
1147unsigned long max_sane_readahead(unsigned long nr); 1155unsigned long max_sane_readahead(unsigned long nr);
1148 1156
1149/* Do stack extension */ 1157/* Do stack extension */