/*static char *SCCSID = "@(#)rahead.h	6.2 91/11/06";*/
/*static char *SCCSID = "@(#)rahead.h	6.2 91/11/06";*/

#ifdef RAHEAD

typedef struct RAT { /* RAT */
    PFHT pfht;
} RAT;

typedef RAT * PRAT;

#ifdef PERFVIEW2
typedef struct CFT { /* CFT */
    LSN lsn;
} CFT;

typedef CFT * PCFT;
#define CACHED_FILES_LIST_SIZE	 8 /* # of most recent opened files recorded */
#endif

/* #define RAHEAD_QUEUE_SIZE	 8 * Max. # of pending read ahead requests */
#define RAHEAD_QUEUE_SIZE	 16  /* Max. # of pending read ahead requests */

#define RA_ON	    0x01	/* Read ahead enabled	      */
#define RA_PEND	    0x02	/* Request pending	      */
#define RA_BIG	    0x04	/* Use BIG buffer	      */
#define RA_CACHE    0x08	/* Read whole file	      */
#define RA_DONE	    0x10	/* Read ahead done	      */
#define RA_CLOSE	    0x20	/* Issue RetHeap(pfht)  */
#define RA_ACTIVE	    0x40	/* Currently active request  */

#ifdef RAHEAD_VARS
extern int RA_HI;
extern int RA_LOW;		/* Must be > 0		      */
extern int MIN_READLEN;		/* Must be < SECSIZE/2	      */
extern int MID_READLEN;		/* SECSIZE		      */
extern int MAX_READLEN;		/* BLOCK * 4		      */
#else
#define RA_HI		    4
#define RA_LOW		    2	/* Must be > 0		      */
#define MIN_READLEN	   32	/* Must be < SECSIZE/2	      */
#define MID_READLEN	 2048 	/* BLOCK 	      */
#define MAX_READLEN	 16384	/* BLOCK * 8		      */
#endif

#define RA_BUFSIZE	    8	/* Buffer size (Cache blocks) */

#define RA_MaxCBlocks    8	/* Max cache blocks (strat2) */

#endif
