Distributed Hash Table File System for Linux

magma_flare Struct Reference

#include <magma_flare_types.h>

Data Fields

pthread_mutex_t mutex
int load
char * path
unsigned char * binhash
char * hash
char * xlated
char * parent_path
unsigned char * parent_binhash
char * parent_hash
char * parent_xlated
char * contents
char * metadata
int locked
int in_use
int destroyable
stat st
int is_cached
int is_upcasted
time_t timestamp
pthread_rwlock_t rwlock
union {
   magma_flare_dir_t *   dir
   magma_flare_file_t *   file
   magma_flare_blockdev_t *   blockdev
   magma_flare_chardev_t *   chardev
   magma_flare_symlink_t *   symlink
   magma_flare_fifo_t *   fifo

Detailed Description

magma_flare_t is the base type of all Flare Objects. Each flare is of this kind, and is later specialized (casted) to one of supported types to be fully usefull.

each flare share the same basic structure (magma_flare_t). that structure has an internal pointer, called "item", which is the way flare system uses to "cast" a generic flare into a specific one rappresenting a file or a directory or a symlink or a (char/block) device or a FIFO.

"item" field is implemented as a union of N different pointers (where N is the number of different flare types known by the flare system), to grant correctness of data type. so, if a flare is casted as a directory flare, it's flare->item.dir field will be allocated to hold a magma_flare_dir_t* structure.

after that casting operation succeeded, field "is_upcasted" will be placed to 1.

Field Documentation

unsigned char* magma_flare::binhash

flare path hashed to binary rappresentation

magma_flare_blockdev_t* magma_flare::blockdev

holds a magma_flare_blockdev_t object if this flare is a block device

magma_flare_chardev_t* magma_flare::chardev

holds a magma_flare_chardev_t object if this flare is a character device

char* magma_flare::contents

contents file path

int magma_flare::destroyable

is destroyable? can be garbage collected?

magma_flare_dir_t* magma_flare::dir

holds a magma_flare_dir_t object if this flare is a directory

magma_flare_fifo_t* magma_flare::fifo

holds a magma_flare_fifo_t object if this flare is a FIFO pipe

magma_flare_file_t* magma_flare::file

holds a magma_flare_file_t object if this flare is a regular file

char* magma_flare::hash

flare path hashed

int magma_flare::in_use

usage counter

int magma_flare::is_cached

has been already cached

int magma_flare::is_upcasted

has been upcasted?

union { ... } magma_flare::item

additional informations for item hosted by this flare

struct magma_flare* magma_flare::left

left child inside the cache

int magma_flare::load

load of this node (for b-tree reordering)

int magma_flare::locked

file locking mechanism -- can be enhanced -- still totally unused!

char* magma_flare::metadata

metadata file path

pthread_mutex_t magma_flare::mutex

lock for this flare inside b-tree cache

struct magma_flare* magma_flare::parent

parent flare inside the cache

unsigned char* magma_flare::parent_binhash

flare parent directory path hashed to binary rappresentation

char* magma_flare::parent_hash

flare parent directory path hashed

char* magma_flare::parent_path

flare parent directory path

char* magma_flare::parent_xlated

parent directory translated (relocated) path

char* magma_flare::path

flare path

struct magma_flare* magma_flare::right

right child inside the cache

pthread_rwlock_t magma_flare::rwlock

readwrite lock

struct stat magma_flare::st

stat buffer

magma_flare_symlink_t* magma_flare::symlink

holds a magma_flare_symlink_t object if this flare is a symbolic link

time_t magma_flare::timestamp

usage timestamp

char* magma_flare::xlated

translated (relocated) path

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