xref: /minix3/minix/servers/vm/cache.h (revision e321f6558257ab50a8b750451c96d1a3ca19e300)
1433d6423SLionel Sambuc 
2433d6423SLionel Sambuc struct cached_page {
3433d6423SLionel Sambuc 	/*  - The (dev, dev_offset) pair are unique;
4433d6423SLionel Sambuc 	 *    the (ino, ino_offset) pair is information and
5433d6423SLionel Sambuc 	 *    might be missing. duplicate do not make sense
6433d6423SLionel Sambuc 	 *    although it won't bother VM much.
7433d6423SLionel Sambuc 	 *  - dev must always be valid, i.e. not NO_DEV
8433d6423SLionel Sambuc 	 *  - ino may be unknown, i.e. VMC_NO_INODE
9433d6423SLionel Sambuc 	 */
10433d6423SLionel Sambuc 	dev_t dev;			/* which dev is it on */
11433d6423SLionel Sambuc 	u64_t dev_offset;		/* offset within dev */
12433d6423SLionel Sambuc 
13433d6423SLionel Sambuc 	ino_t ino;			/* which ino is it about */
14433d6423SLionel Sambuc 	u64_t ino_offset;		/* offset within ino */
15*e321f655SDavid van Moolenbroek 	int flags;			/* currently only VMSF_ONCE or 0 */
16433d6423SLionel Sambuc 	struct phys_block *page;	/* page ptr */
17433d6423SLionel Sambuc 	struct cached_page *older;	/* older in lru chain */
18433d6423SLionel Sambuc 	struct cached_page *newer;	/* newer in lru chain */
19433d6423SLionel Sambuc 	struct cached_page *hash_next_dev; /* next in hash chain (bydev) */
20433d6423SLionel Sambuc 	struct cached_page *hash_next_ino; /* next in hash chain (byino) */
21433d6423SLionel Sambuc };
22433d6423SLionel Sambuc 
23