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: I5ddf51a27e3b85b87a10556be87fc33bb92b1090
24 lines
527 B
C
24 lines
527 B
C
#ifndef PHYS_REGION_H
|
|
#define PHYS_REGION_H 1
|
|
|
|
#include <stddef.h>
|
|
|
|
#include "memtype.h"
|
|
|
|
typedef struct phys_region {
|
|
struct phys_block *ph;
|
|
struct vir_region *parent; /* vir_region or NULL if yielded */
|
|
vir_bytes offset; /* offset from start of vir region */
|
|
#if SANITYCHECKS
|
|
int written; /* written to pagetable */
|
|
#endif
|
|
|
|
/* what kind of memory is it? */
|
|
mem_type_t *memtype;
|
|
|
|
/* list of phys_regions that reference the same phys_block */
|
|
struct phys_region *next_ph_list;
|
|
} phys_region_t;
|
|
|
|
#endif
|