nfs-ganesha 1.4
Classes | Defines | Typedefs | Enumerations | Functions

mfsl_types.h File Reference

#include <sys/types.h>
#include <sys/param.h>
#include <pthread.h>
#include <dirent.h>
#include "config_parsing.h"
#include "LRU_List.h"
#include "HashTable.h"
#include "err_fsal.h"
#include "err_mfsl.h"

Go to the source code of this file.

Classes

struct  mfsl_object_specific_data__
struct  mfsl_object__
struct  mfsl_precreated_object__
struct  mfsl_synclet_context__
struct  mfsl_synclet_data__
struct  mfsl_async_op_create_args__
struct  mfsl_async_op_create_res__
struct  mfsl_async_op_mkdir_args__
struct  mfsl_async_op_mkdir_res__
struct  mfsl_async_op_link_args__
struct  mfsl_async_op_link_res__
struct  mfsl_async_op_remove_args__
struct  mfsl_async_op_remove_res__
struct  mfsl_async_op_rename_args__
struct  mfsl_async_op_rename_res__
struct  mfsl_async_op_setattr_args__
struct  mfsl_async_op_setattr_res__
struct  mfsl_async_op_truncate_args__
struct  mfsl_async_op_truncate_res__
struct  mfsl_async_op_symlink_args__
struct  mfsl_async_op_symlink_res__
union  mfsl_async_op_args__
union  mfsl_async_op_res__
struct  mfsl_async_op_desc__
struct  mfsl_parameter__
struct  mfsl_context__

Defines

#define TRUE   1
#define FALSE   0
#define CONF_LABEL_MFSL_ASYNC   "MFSL_Async"
#define MFSL_ASYNC_DEFAULT_NB_SYNCLETS   10
#define MFSL_ASYNC_DEFAULT_SLEEP_TIME   60
#define MFSL_ASYNC_DEFAULT_BEFORE_GC   10
#define MFSL_ASYNC_DEFAULT_NB_PREALLOCATED_DIRS   10
#define MFSL_ASYNC_DEFAULT_NB_PREALLOCATED_FILES   100

Typedefs

typedef enum mfsl_async_health__ mfsl_async_health_t
typedef struct
mfsl_object_specific_data__ 
mfsl_object_specific_data_t
typedef struct mfsl_object__ mfsl_object_t
typedef struct
mfsl_precreated_object__ 
mfsl_precreated_object_t
typedef struct
mfsl_synclet_context__ 
mfsl_synclet_context_t
typedef enum mfsl_async_addr_type__ mfsl_async_addr_type_t
typedef struct mfsl_synclet_data__ mfsl_synclet_data_t
typedef enum mfsl_async_op_type__ mfsl_async_op_type_t
typedef struct
mfsl_async_op_create_args__ 
mfsl_async_op_create_args_t
typedef struct
mfsl_async_op_create_res__ 
mfsl_async_op_create_res_t
typedef struct
mfsl_async_op_mkdir_args__ 
mfsl_async_op_mkdir_args_t
typedef struct
mfsl_async_op_mkdir_res__ 
mfsl_async_op_mkdir_res_t
typedef struct
mfsl_async_op_link_args__ 
mfsl_async_op_link_args_t
typedef struct
mfsl_async_op_link_res__ 
mfsl_async_op_link_res_t
typedef struct
mfsl_async_op_remove_args__ 
mfsl_async_op_remove_args_t
typedef struct
mfsl_async_op_remove_res__ 
mfsl_async_op_remove_res_t
typedef struct
mfsl_async_op_rename_args__ 
mfsl_async_op_rename_args_t
typedef struct
mfsl_async_op_rename_res__ 
mfsl_async_op_rename_res_t
typedef struct
mfsl_async_op_setattr_args__ 
mfsl_async_op_setattr_args_t
typedef struct
mfsl_async_op_setattr_res__ 
mfsl_async_op_setattr_res_t
typedef struct
mfsl_async_op_truncate_args__ 
mfsl_async_op_truncate_args_t
typedef struct
mfsl_async_op_truncate_res__ 
mfsl_async_op_truncate_res_t
typedef struct
mfsl_async_op_symlink_args__ 
mfsl_async_op_symlink_args_t
typedef struct
mfsl_async_op_symlink_res__ 
mfsl_async_op_symlink_res_t
typedef union mfsl_async_op_args__ mfsl_async_op_args_t
typedef union mfsl_async_op_res__ mfsl_async_op_res_t
typedef struct mfsl_async_op_desc__ mfsl_async_op_desc_t
typedef struct mfsl_parameter__ mfsl_parameter_t
typedef struct mfsl_context__ mfsl_context_t

Enumerations

enum  mfsl_async_health__ { MFSL_ASYNC_SYNCHRONOUS = 0, MFSL_ASYNC_ASYNCHRONOUS = 1, MFSL_ASYNC_NEVER_SYNCED = 2 }
enum  mfsl_async_addr_type__ { MFSL_ASYNC_ADDR_DIRECT = 1, MFSL_ASYNC_ADDR_INDIRECT = 2 }
enum  mfsl_async_op_type__ {
  MFSL_ASYNC_OP_CREATE = 0, MFSL_ASYNC_OP_MKDIR = 1, MFSL_ASYNC_OP_LINK = 2, MFSL_ASYNC_OP_REMOVE = 3,
  MFSL_ASYNC_OP_RENAME = 4, MFSL_ASYNC_OP_SETATTR = 5, MFSL_ASYNC_OP_TRUNCATE = 6, MFSL_ASYNC_OP_SYMLINK = 7
}

Functions

void * mfsl_synclet_thread (void *Arg)
void * mfsl_asynchronous_dispatcher_thread (void *Arg)
fsal_status_t mfsl_async_create (mfsl_async_op_desc_t *popasyncdesc)
fsal_status_t mfsl_async_mkdir (mfsl_async_op_desc_t *popasyncdesc)
fsal_status_t mfsl_async_link (mfsl_async_op_desc_t *popasyncdesc)
fsal_status_t mfsl_async_remove (mfsl_async_op_desc_t *popasyncdesc)
fsal_status_t mfsl_async_rename (mfsl_async_op_desc_t *popasyncdesc)
fsal_status_t mfsl_async_setattr (mfsl_async_op_desc_t *popasyncdesc)
fsal_status_t mfsl_async_truncate (mfsl_async_op_desc_t *popasyncdesc)
fsal_status_t mfsl_async_symlink (mfsl_async_op_desc_t *popasyncdesc)
int mfsl_async_hash_init (void)
int mfsl_async_set_specdata (mfsl_object_t *key, mfsl_object_specific_data_t *value)
int mfsl_async_get_specdata (mfsl_object_t *key, mfsl_object_specific_data_t **value)
int mfsl_async_remove_specdata (mfsl_object_t *key)
void * mfsl_async_synclet_thread (void *Arg)
void * mfsl_async_asynchronous_dispatcher_thread (void *Arg)
fsal_status_t mfsl_async_post_async_op (mfsl_async_op_desc_t *popdes, mfsl_object_t *pmobject)
fsal_status_t MFSL_async_post (mfsl_async_op_desc_t *popdesc)
fsal_status_t mfsl_async_init_precreated_directories (fsal_op_context_t *pcontext, pool_t *pool_dirs)
fsal_status_t mfsl_async_init_precreated_files (fsal_op_context_t *pcontext, pool_t *pool_dirs)
fsal_status_t mfsl_async_init_clean_precreated_objects (fsal_op_context_t *pcontext)
int mfsl_async_is_object_asynchronous (mfsl_object_t *object)
fsal_status_t mfsl_async_init_symlinkdir (fsal_op_context_t *pcontext)
void constructor_preacreated_entries (void *ptr)
fsal_status_t MFSL_PrepareContext (fsal_op_context_t *pcontext)
fsal_status_t MFSL_RefreshContext (mfsl_context_t *pcontext, fsal_op_context_t *pfsal_context)
fsal_status_t MFSL_ASYNC_GetSyncletContext (mfsl_synclet_context_t *pcontext, fsal_op_context_t *pfsal_context)
fsal_status_t MFSL_ASYNC_RefreshSyncletContext (mfsl_synclet_context_t *pcontext, fsal_op_context_t *pfsal_context)
int MFSL_ASYNC_is_synced (mfsl_object_t *mobject)

Define Documentation

#define CONF_LABEL_MFSL_ASYNC   "MFSL_Async"

Definition at line 44 of file MFSL/MFSL_ASYNC/mfsl_types.h.

#define FALSE   0

Definition at line 37 of file MFSL/MFSL_ASYNC/mfsl_types.h.

#define MFSL_ASYNC_DEFAULT_BEFORE_GC   10

Definition at line 48 of file MFSL/MFSL_ASYNC/mfsl_types.h.

#define MFSL_ASYNC_DEFAULT_NB_PREALLOCATED_DIRS   10

Definition at line 49 of file MFSL/MFSL_ASYNC/mfsl_types.h.

#define MFSL_ASYNC_DEFAULT_NB_PREALLOCATED_FILES   100

Definition at line 50 of file MFSL/MFSL_ASYNC/mfsl_types.h.

#define MFSL_ASYNC_DEFAULT_NB_SYNCLETS   10

Definition at line 46 of file MFSL/MFSL_ASYNC/mfsl_types.h.

#define MFSL_ASYNC_DEFAULT_SLEEP_TIME   60

Definition at line 47 of file MFSL/MFSL_ASYNC/mfsl_types.h.

#define TRUE   1

Definition at line 34 of file MFSL/MFSL_ASYNC/mfsl_types.h.


Typedef Documentation

typedef struct mfsl_object__ mfsl_object_t

Enumeration Type Documentation

Enumerator:
MFSL_ASYNC_ADDR_DIRECT 
MFSL_ASYNC_ADDR_INDIRECT 

Definition at line 95 of file MFSL/MFSL_ASYNC/mfsl_types.h.

Enumerator:
MFSL_ASYNC_SYNCHRONOUS 
MFSL_ASYNC_ASYNCHRONOUS 
MFSL_ASYNC_NEVER_SYNCED 

Definition at line 63 of file MFSL/MFSL_ASYNC/mfsl_types.h.

Enumerator:
MFSL_ASYNC_OP_CREATE 
MFSL_ASYNC_OP_MKDIR 
MFSL_ASYNC_OP_LINK 
MFSL_ASYNC_OP_REMOVE 
MFSL_ASYNC_OP_RENAME 
MFSL_ASYNC_OP_SETATTR 
MFSL_ASYNC_OP_TRUNCATE 
MFSL_ASYNC_OP_SYMLINK 

Definition at line 112 of file MFSL/MFSL_ASYNC/mfsl_types.h.


Function Documentation

void constructor_preacreated_entries ( void *  ptr)
void* mfsl_async_asynchronous_dispatcher_thread ( void *  Arg)

mfsl_async_asynchronous_dispatcher_thread: this thread will assign asynchronous operation to the synclets.

Parameters:
Arg(unused)
Returns:
Pointer to the result (but this function will mostly loop forever).

Definition at line 386 of file mfsl_async_synclet.c.

fsal_status_t mfsl_async_create ( mfsl_async_op_desc_t popasyncdesc)
int mfsl_async_get_specdata ( mfsl_object_t key,
mfsl_object_specific_data_t **  value 
)

Definition at line 228 of file mfsl_async_hash.c.

fsal_status_t MFSL_ASYNC_GetSyncletContext ( mfsl_synclet_context_t pcontext,
fsal_op_context_t pfsal_context 
)

MFSL_GetSyncletContext: Creates a MFSL context for a synclet.

Creates a MFSL context for a synclet.

Parameters:
pcontext[INOUT] pointer to MFSL context to be used
pfsal_context[INOUT] pointer to FSAL context to be used
Returns:
a FSAL status

Definition at line 472 of file mfsl_async.c.

int mfsl_async_hash_init ( void  )

Definition at line 180 of file mfsl_async_hash.c.

fsal_status_t mfsl_async_init_clean_precreated_objects ( fsal_op_context_t pcontext)

Definition at line 117 of file mfsl_async.c.

fsal_status_t mfsl_async_init_precreated_directories ( fsal_op_context_t pcontext,
pool_t pool_dirs 
)

mfsl_async_init_precreated_directories: allocate pre-created directories for asynchronous create.

Allocate pre-created directories for asynchronous create.

Parameters:
pcontext[INOUT] pointer to FSAL context to be used
pool_dirs[INOUT] pointer to MFSL precreated entries to be created
Returns:
a FSAL status

Definition at line 297 of file mfsl_async.c.

fsal_status_t mfsl_async_init_precreated_files ( fsal_op_context_t pcontext,
pool_t pool_files 
)

mfsl_async_init_precreated_files: allocate pre-created files for asynchronous create.

Allocate pre-created files for asynchronous create.

Parameters:
pcontext[INOUT] pointer to FSAL context to be used
pool_file[INOUT] pointer to MFSL precreated entries to be created
Returns:
a FSAL status

Definition at line 355 of file mfsl_async.c.

fsal_status_t mfsl_async_init_symlinkdir ( fsal_op_context_t pcontext)

Definition at line 81 of file mfsl_async.c.

int mfsl_async_is_object_asynchronous ( mfsl_object_t object)

Definition at line 281 of file mfsl_async_hash.c.

int MFSL_ASYNC_is_synced ( mfsl_object_t mobject)

MFSL_ASYNC_is_synced: returns TRUE if the object is synced, FALSE is asynchronous.

Returns TRUE if the object is synced, FALSE is asynchronous.

Parameters:
mobject[IN] pointer to MFSL object to be tested
Returns:
TRUE if the object is synced, FALSE is asynchronous.

Definition at line 638 of file mfsl_async.c.

fsal_status_t mfsl_async_link ( mfsl_async_op_desc_t popasyncdesc)
fsal_status_t mfsl_async_mkdir ( mfsl_async_op_desc_t popasyncdesc)
fsal_status_t MFSL_async_post ( mfsl_async_op_desc_t popdesc)

MFSL_async_post: posts an asynchronous operation to the pending operations list.

Posts an asynchronous operation to the pending operations list.

Parameters:
popdesc[IN] the asynchronous operation descriptor

Definition at line 64 of file mfsl_async_synclet.c.

fsal_status_t mfsl_async_post_async_op ( mfsl_async_op_desc_t popdes,
mfsl_object_t pmobject 
)
fsal_status_t MFSL_ASYNC_RefreshSyncletContext ( mfsl_synclet_context_t pcontext,
fsal_op_context_t pfsal_context 
)

MFSL_ASYNC_RefreshSyncletContext: Refreshes a MFSL context for a synclet.

Refreshes a MFSL context for a synclet.

Parameters:
pcontext[INOUT] pointer to MFSL context to be used
pfsal_context[INOUT] pointer to FSAL context to be used
Returns:
a FSAL status

Definition at line 616 of file mfsl_async.c.

fsal_status_t mfsl_async_remove ( mfsl_async_op_desc_t popasyncdesc)
int mfsl_async_remove_specdata ( mfsl_object_t key)

Definition at line 258 of file mfsl_async_hash.c.

fsal_status_t mfsl_async_rename ( mfsl_async_op_desc_t popasyncdesc)
int mfsl_async_set_specdata ( mfsl_object_t key,
mfsl_object_specific_data_t value 
)

Definition at line 202 of file mfsl_async_hash.c.

fsal_status_t mfsl_async_setattr ( mfsl_async_op_desc_t popasyncdesc)
fsal_status_t mfsl_async_symlink ( mfsl_async_op_desc_t popasyncdesc)
void* mfsl_async_synclet_thread ( void *  Arg)

mfsl_async_synclet_thread: thread used for asynchronous cache inode management.

This thread is used for managing asynchrous inode management

Parameters:
IndexArgthe index for the thread
Returns:
Pointer to the result (but this function will mostly loop forever).

Definition at line 232 of file mfsl_async_synclet.c.

fsal_status_t mfsl_async_truncate ( mfsl_async_op_desc_t popasyncdesc)
void* mfsl_asynchronous_dispatcher_thread ( void *  Arg)
fsal_status_t MFSL_PrepareContext ( fsal_op_context_t pcontext)

MFSL_PrepareContext: Prepares a MFSL context for a thead.

Prepares a MFSL context for a thread.

Parameters:
pcontext[INOUT] pointer to MFSL context to be used
Returns:
a FSAL status

Definition at line 412 of file mfsl_async.c.

fsal_status_t MFSL_RefreshContext ( mfsl_context_t pcontext,
fsal_op_context_t pfsal_context 
)

MFSL_RefreshContext: Refreshes a MFSL context for a thead.

Refreshes a MFSL context for a thread.

Parameters:
pcontext[INOUT] pointer to MFSL context to be used
pfsal_context[INOUT] pointer to FSAL context to be used
Returns:
a FSAL status

Definition at line 122 of file mfsl_aio.c.

void* mfsl_synclet_thread ( void *  Arg)