revert-mm-fix-blkdev-size-calculation-in-generic_write_checks
[linux-2.6/linux-trees-mm.git] / fs / reiser4 / readahead.h
blob5ab53e3c87032a9c9bfaa31a7e42f36b474f17ef
1 /* Copyright 2001, 2002, 2003 by Hans Reiser, licensing governed by reiser4/README */
3 #ifndef __READAHEAD_H__
4 #define __READAHEAD_H__
6 #include "key.h"
8 typedef enum {
9 RA_ADJACENT_ONLY = 1, /* only requests nodes which are adjacent.
10 Default is NO (not only adjacent) */
11 } ra_global_flags;
13 /* reiser4 super block has a field of this type.
14 It controls readahead during tree traversals */
15 struct formatted_ra_params {
16 unsigned long max; /* request not more than this amount of nodes.
17 Default is totalram_pages / 4 */
18 int flags;
21 typedef struct {
22 reiser4_key key_to_stop;
23 } ra_info_t;
25 void formatted_readahead(znode *, ra_info_t *);
26 void reiser4_init_ra_info(ra_info_t * rai);
28 struct reiser4_file_ra_state {
29 loff_t start; /* Current window */
30 loff_t size;
31 loff_t next_size; /* Next window size */
32 loff_t ahead_start; /* Ahead window */
33 loff_t ahead_size;
34 loff_t max_window_size; /* Maximum readahead window */
35 loff_t slow_start; /* enlarging r/a size algorithm. */
38 extern void reiser4_readdir_readahead_init(struct inode *dir, tap_t * tap);
40 /* __READAHEAD_H__ */
41 #endif
44 Local variables:
45 c-indentation-style: "K&R"
46 mode-name: "LC"
47 c-basic-offset: 8
48 tab-width: 8
49 fill-column: 120
50 End: