Distributed Hash Table File System for Linux

magma_flare_dir_t Struct Reference

#include <magma_flare_types.h>

Data Fields

int lastpage
char * pages
int fd
unsigned int entries

Detailed Description

cast structure for directory flares

Field Documentation

counter for mmap()ped pages

directories are implemented using mmap() system call to reduce possibility of data loss. mmap() simply bind a memory region to a file, loading file contents in memory and saving it back to disk while munmap() or msync() are called. Directories are entierly mapped in memory (i.e. when a directory is accessed and loaded in magma cache system, the whole file "contents" is mapped in memory). If directory needs to grow, this field is incremented and a new page is mapped in memory.

next field is used by mmap()ped system to access directory pages by offsets of 4096 bytes (which is Linux page size). When a new page is added, first null entry in this array should be pointed to new page. Directories are saved as a sequence of null terminated strings.

this is the filedescriptor used to mmap() dirctory contents on memory.

UPDATE: mmap() operations does not require the filedescriptor to remain open. This field will be removed somewhere in the future.

number of entries present

The documentation for this struct was generated from the following file:
This file last modified Wednesday, 09-Jan-2008 20:03:43 CET