1 2 /* Common definitions and declarations for the testcache code 3 * and the testcache clients. 4 */ 5 6 #include <sys/types.h> 7 #include <machine/param.h> 8 #include <machine/vmparam.h> 9 10 #define MAXBLOCKS 1500000 11 12 #define MAXBLOCKSIZE (4*PAGE_SIZE) 13 14 int dowriteblock(int b, int blocksize, u32_t seed, char *block); 15 int readblock(int b, int blocksize, u32_t seed, char *block); 16 void testend(void); 17 int dotest(int blocksize, int nblocks, int iterations); 18 void cachequiet(int quiet); 19 void get_fd_offset(int b, int blocksize, u64_t *file_offset, int *fd); 20 void makefiles(int n); 21 22 #define OK_BLOCK_GONE -999 23 24 /* for file-oriented tests: 25 * 26 * we want to flexibly split tests over multiple files 27 * - for big working sets we might run over the 2GB MFS file limit 28 * - we might want to test the FS being able to handle lots of 29 * files / unusual metadata situations 30 */ 31 #define MBPERFILE 2000 32 #define MB (1024*1024) 33 #define MAXFILES ((u64_t) MAXBLOCKS * MAXBLOCKSIZE / MB / MBPERFILE + 1) 34 35 extern int fds[MAXFILES], bigflag; 36 37