nfs-ganesha 1.4
Defines | Functions | Variables

fsal_internal.c File Reference

#include "fsal.h"
#include "fsal_internal.h"
#include "SemN.h"
#include <pthread.h>

Go to the source code of this file.

Defines

#define FSAL_INTERNAL_C
#define YOUR_SUPPORTED_ATTRIBUTES

Functions

void fsal_increment_nbcall (int function_index, fsal_status_t status)
void fsal_internal_getstats (fsal_statistics_t *output_stats)
void TakeTokenFSCall ()
void ReleaseTokenFSCall ()
fsal_status_t fsal_internal_init_global (fsal_init_info_t *fsal_info, fs_common_initinfo_t *fs_common_info)
fsal_boolean_t fsal_do_log (fsal_status_t status)
int fsal_set_thread_context (fsal_op_context_t *p_ctx)
fsal_op_context_tfsal_get_thread_context ()

Variables

fsal_staticfsinfo_t global_fs_info
struct ganefuse_operationsp_fs_ops = NULL
void * fs_user_data = NULL
void * fs_private_data = NULL
semaphore_t sem_fs_calls

Define Documentation

#define FSAL_INTERNAL_C

Definition at line 15 of file FSAL_FUSELIKE/fsal_internal.c.

#define YOUR_SUPPORTED_ATTRIBUTES

Function Documentation

fsal_boolean_t fsal_do_log ( fsal_status_t  status)

fsal_do_log: Indicates if an FSAL error has to be traced into its log file in the NIV_EVENT level. (in the other cases, return codes are only logged in the NIV_FULL_DEBUG logging lovel).

Parameters:
status(input),:The fsal status that is to be tested.
Returns:
- TRUE if the error is to be traced.
  • FALSE if the error must not be traced except in NIV_FULL_DEBUG level.

Definition at line 345 of file FSAL_FUSELIKE/fsal_internal.c.

fsal_op_context_t* fsal_get_thread_context ( )

This function retrieves the last context associated to a thread.

Definition at line 410 of file FSAL_FUSELIKE/fsal_internal.c.

void fsal_increment_nbcall ( int  function_index,
fsal_status_t  status 
)

fsal_increment_nbcall: Updates fonction call statistics.

Parameters:
function_index(input): Index of the function whom number of call is to be incremented.
status(input): Status the function returned.
Returns:
Nothing.

Definition at line 112 of file FSAL_FUSELIKE/fsal_internal.c.

void fsal_internal_getstats ( fsal_statistics_t output_stats)

fsal_internal_getstats: (For internal use in the FSAL). Retrieve call statistics for current thread.

Parameters:
output_stats(output): Pointer to the call statistics structure.
Returns:
Nothing.

Definition at line 189 of file FSAL_FUSELIKE/fsal_internal.c.

fsal_status_t fsal_internal_init_global ( fsal_init_info_t fsal_info,
fs_common_initinfo_t fs_common_info 
)

This function initializes shared variables of the FSAL.

Definition at line 262 of file FSAL_FUSELIKE/fsal_internal.c.

int fsal_set_thread_context ( fsal_op_context_t p_ctx)

This function sets the current context for a filesystem operation, so it can be retrieved with fuse_get_context(). The structure pointed by p_ctx must stay allocated and kept unchanged during the FS call.

Definition at line 394 of file FSAL_FUSELIKE/fsal_internal.c.

void ReleaseTokenFSCall ( )

Definition at line 248 of file FSAL_FUSELIKE/fsal_internal.c.

void TakeTokenFSCall ( )

Used to limit the number of simultaneous calls to Filesystem.

Definition at line 237 of file FSAL_FUSELIKE/fsal_internal.c.


Variable Documentation

void* fs_private_data = NULL

Definition at line 82 of file FSAL_FUSELIKE/fsal_internal.c.

void* fs_user_data = NULL

Definition at line 81 of file FSAL_FUSELIKE/fsal_internal.c.

Definition at line 31 of file FSAL_FUSELIKE/fsal_internal.c.

struct ganefuse_operations* p_fs_ops = NULL

Definition at line 78 of file FSAL_FUSELIKE/fsal_internal.c.

Definition at line 86 of file FSAL_FUSELIKE/fsal_internal.c.