|
@@ -8,9 +8,7 @@
|
|
|
*/
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
-#include <linux/fs.h>
|
|
|
#include <linux/gfp.h>
|
|
|
-#include <linux/mm.h>
|
|
|
#include <linux/export.h>
|
|
|
#include <linux/blkdev.h>
|
|
|
#include <linux/backing-dev.h>
|
|
@@ -20,6 +18,8 @@
|
|
|
#include <linux/syscalls.h>
|
|
|
#include <linux/file.h>
|
|
|
|
|
|
+#include "internal.h"
|
|
|
+
|
|
|
/*
|
|
|
* Initialise a struct file's readahead state. Assumes that the caller has
|
|
|
* memset *ra to zero.
|
|
@@ -149,8 +149,7 @@ out:
|
|
|
*
|
|
|
* Returns the number of pages requested, or the maximum amount of I/O allowed.
|
|
|
*/
|
|
|
-static int
|
|
|
-__do_page_cache_readahead(struct address_space *mapping, struct file *filp,
|
|
|
+int __do_page_cache_readahead(struct address_space *mapping, struct file *filp,
|
|
|
pgoff_t offset, unsigned long nr_to_read,
|
|
|
unsigned long lookahead_size)
|
|
|
{
|
|
@@ -243,20 +242,6 @@ unsigned long max_sane_readahead(unsigned long nr)
|
|
|
return min(nr, MAX_READAHEAD);
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
- * Submit IO for the read-ahead request in file_ra_state.
|
|
|
- */
|
|
|
-unsigned long ra_submit(struct file_ra_state *ra,
|
|
|
- struct address_space *mapping, struct file *filp)
|
|
|
-{
|
|
|
- int actual;
|
|
|
-
|
|
|
- actual = __do_page_cache_readahead(mapping, filp,
|
|
|
- ra->start, ra->size, ra->async_size);
|
|
|
-
|
|
|
- return actual;
|
|
|
-}
|
|
|
-
|
|
|
/*
|
|
|
* Set the initial window size, round to next power of 2 and square
|
|
|
* for small size, x 4 for medium, and x 2 for large
|