minix/servers/vm/glo.h
Ben Gras 49eb1f4806 vm: new secondary cache code
Primary purpose of change: to support the mmap implementation, VM must
know both (a) about some block metadata for FS cache blocks, i.e.
inode numbers and inode offsets where applicable; and (b) know about
*all* cache blocks, i.e.  also of the FS primary caches and not just
the blocks that spill into the secondary one. This changes the
interface and VM data structures.

This change is only for the interface (libminixfs) and VM data
structures; the filesystem code is unmodified, so although the
secondary cache will be used as normal, blocks will not be annotated
with inode information until the FS is modified to provide this
information. Until it is modified, mmap of files will fail gracefully
on such filesystems.

This is indicated to VFS/VM by returning ENOSYS for REQ_PEEK.

Change-Id: I1d2df6c485e6c5e89eb28d9055076cc02629594e
2013-04-24 10:18:16 +00:00

41 lines
918 B
C

#include <minix/sys_config.h>
#include <minix/type.h>
#include <minix/param.h>
#include <sys/stat.h>
#include <a.out.h>
#include "vm.h"
#include "vmproc.h"
#if _MAIN
#undef EXTERN
#define EXTERN
#endif
#define VMP_EXECTMP _NR_PROCS
#define VMP_NR _NR_PROCS+1
EXTERN struct vmproc vmproc[VMP_NR];
EXTERN kinfo_t kernel_boot_info;
#if SANITYCHECKS
EXTERN int nocheck;
EXTERN int incheck;
EXTERN int sc_lastline;
EXTERN char *sc_lastfile;
#endif
extern struct minix_kerninfo *_minix_kerninfo;
/* mem types */
EXTERN mem_type_t mem_type_anon, /* anonymous memory */
mem_type_directphys, /* direct physical mapping memory */
mem_type_anon_contig, /* physically contig anon memory */
mem_type_cache, /* disk cache */
mem_type_mappedfile, /* memory with file contents */
mem_type_shared; /* memory shared by multiple processes */
/* total number of memory pages */
EXTERN int total_pages;