nfs-ganesha 1.4
|
#include "fsal.h"
#include "fsal_internal.h"
#include "posixdb_consistency.h"
#include "abstract_mem.h"
#include "SemN.h"
#include "fsal_convert.h"
#include <libgen.h>
#include <pthread.h>
#include <string.h>
#include <mntent.h>
Go to the source code of this file.
#define FSAL_INTERNAL_C |
Definition at line 15 of file FSAL_POSIX/fsal_internal.c.
void fsal_increment_nbcall | ( | int | function_index, |
fsal_status_t | status | ||
) |
fsal_increment_nbcall: Updates fonction call statistics.
function_index | (input): Index of the function whom number of call is to be incremented. |
status | (input): Status the function returned. |
Definition at line 103 of file FSAL_POSIX/fsal_internal.c.
fsal_status_t fsal_internal_appendFSALNameToFSALPath | ( | fsal_path_t * | p_path, |
fsal_name_t * | p_name | ||
) |
p_path <- p_path + '/' + p_name
p_path | |
p_name |
Definition at line 471 of file FSAL_POSIX/fsal_internal.c.
fsal_status_t fsal_internal_getInfoFromChildrenList | ( | posixfsal_op_context_t * | p_context, |
posixfsal_handle_t * | p_parent_dir_handle, | ||
fsal_name_t * | p_fsalname, | ||
fsal_posixdb_fileinfo_t * | p_infofs, | ||
fsal_posixdb_child * | p_children, | ||
unsigned int | children_count, | ||
posixfsal_handle_t * | p_object_handle | ||
) |
Get the handle of a file from a fsal_posixdb_child array, knowing its name.
p_context | |
p_parent_dir_handle | Handle of the parent directory |
p_fsalname | Name of the object |
p_infofs | Information about the file (taken from the filesystem) to be compared to information stored in database |
p_children | fsal_posixdb_child array (that contains the entries of the directory stored in the db) |
p_object_handle | Handle of the file. |
Definition at line 695 of file FSAL_POSIX/fsal_internal.c.
fsal_status_t fsal_internal_getInfoFromName | ( | posixfsal_op_context_t * | p_context, |
posixfsal_handle_t * | p_parent_dir_handle, | ||
fsal_name_t * | p_fsalname, | ||
fsal_posixdb_fileinfo_t * | p_infofs, | ||
posixfsal_handle_t * | p_object_handle | ||
) |
Get the handle of a file, knowing its name and its parent dir.
p_context | |
p_parent_dir_handle | Handle of the parent directory |
p_fsalname | Name of the object |
p_infofs | Information about the file (taken from the filesystem) to be compared to information stored in database |
p_object_handle | Handle of the file. |
Definition at line 628 of file FSAL_POSIX/fsal_internal.c.
fsal_status_t fsal_internal_getPathFromHandle | ( | posixfsal_op_context_t * | p_context, |
posixfsal_handle_t * | p_handle, | ||
int | is_dir, | ||
fsal_path_t * | p_fsalpath, | ||
struct stat * | p_buffstat | ||
) |
Get a valid path associated to an handle. The function selects many paths from the DB and return the first valid one. If is_dir is set, then only 1 path will be constructed from the database.
Definition at line 505 of file FSAL_POSIX/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.
output_stats | (output): Pointer to the call statistics structure. |
Definition at line 181 of file FSAL_POSIX/fsal_internal.c.
fsal_status_t fsal_internal_init_global | ( | fsal_init_info_t * | fsal_info, |
fs_common_initinfo_t * | fs_common_info, | ||
posixfs_specific_initinfo_t * | fs_specific_info | ||
) |
This function initializes shared variables of the FSAL.
Definition at line 272 of file FSAL_POSIX/fsal_internal.c.
int fsal_internal_path2fsname | ( | char * | rpath, |
char * | fs_spec | ||
) |
Definition at line 902 of file FSAL_POSIX/fsal_internal.c.
fsal_status_t fsal_internal_posix2posixdb_fileinfo | ( | struct stat * | buffstat, |
fsal_posixdb_fileinfo_t * | info | ||
) |
convert 'struct stat' to 'fsal_posixdb_fileinfo_t'
buffstat | |
info |
Definition at line 415 of file FSAL_POSIX/fsal_internal.c.
fsal_status_t fsal_internal_posixdb_add_entry | ( | fsal_posixdb_conn * | p_conn, |
fsal_name_t * | p_filename, | ||
fsal_posixdb_fileinfo_t * | p_info, | ||
posixfsal_handle_t * | p_dir_handle, | ||
posixfsal_handle_t * | p_new_handle | ||
) |
Add a new entry to the database. Remove an already existing handle if it's not consistent
Definition at line 434 of file FSAL_POSIX/fsal_internal.c.
void fsal_internal_SetCredentialLifetime | ( | fsal_uint_t | lifetime_in | ) |
Set credential lifetime. (For internal use in the FSAL). Set the period for thread's credential renewal.
lifetime_in | (input): The period for thread's credential renewal. |
Definition at line 239 of file FSAL_POSIX/fsal_internal.c.
fsal_status_t fsal_internal_testAccess | ( | posixfsal_op_context_t * | p_context, |
fsal_accessflags_t | access_type, | ||
struct stat * | p_buffstat, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
test the access to a file knowing its POSIX attributes (struct stat) OR its FSAL attributes (fsal_attrib_list_t).
Definition at line 764 of file FSAL_POSIX/fsal_internal.c.
void ReleaseTokenFSCall | ( | ) |
Definition at line 258 of file FSAL_POSIX/fsal_internal.c.
void TakeTokenFSCall | ( | ) |
Used to limit the number of simultaneous calls to Filesystem.
Definition at line 247 of file FSAL_POSIX/fsal_internal.c.
fsal_uint_t CredentialLifetime = 3600 |
Definition at line 33 of file FSAL_POSIX/fsal_internal.c.
Definition at line 39 of file FSAL_POSIX/fsal_internal.c.
Definition at line 40 of file FSAL_POSIX/fsal_internal.c.
Definition at line 77 of file FSAL_POSIX/fsal_internal.c.