1 /* Copyright 2001, 2002, 2003 by Hans Reiser, licensing governed by reiser4/README */
3 #ifndef __READAHEAD_H__
4 #define __READAHEAD_H__
9 RA_ADJACENT_ONLY
= 1, /* only requests nodes which are adjacent.
10 Default is NO (not only adjacent) */
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 */
22 reiser4_key key_to_stop
;
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 */
31 loff_t next_size
; /* Next window size */
32 loff_t ahead_start
; /* Ahead window */
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
);
45 c-indentation-style: "K&R"