|
nfs-ganesha 1.4
|
#include "fsal.h"#include "fsal_internal.h"#include "fsal_convert.h"#include "config_parsing.h"#include <string.h>Go to the source code of this file.
| #define low32m | ( | a | ) | ( (unsigned int)a ) |
Definition at line 46 of file FSAL_CEPH/fsal_tools.c.
| #define STRCMP strcasecmp |
Definition at line 45 of file FSAL_CEPH/fsal_tools.c.
| fsal_status_t CEPHFSAL_DigestHandle | ( | fsal_export_context_t * | extexport, |
| fsal_digesttype_t | output_type, | ||
| fsal_handle_t * | exthandle, | ||
| struct fsal_handle_desc * | fh_desc | ||
| ) |
Create a wire level representation of an FSAL handle.
Convert an fsal_handle_t to a buffer to be included into NFS handles, or another digest.
| extexport | [in] The export context |
| output_type | [in] The type of digest requested |
| exthandle | [in] The handle to be digested |
| fh_desc | [out] Counted buffer to hold the handle |
Definition at line 154 of file FSAL_CEPH/fsal_tools.c.
| fsal_status_t CEPHFSAL_ExpandHandle | ( | fsal_export_context_t * | extexport, |
| fsal_digesttype_t | in_type, | ||
| struct fsal_handle_desc * | fh_desc | ||
| ) |
Bring in a wire handle.
All we do here is adjust the descriptor length based on knowing the internals of struct file_handle and let the upper level handle memcpy, hash lookup and/or compare. No copies anymore.
| extexport | [in] The export handle |
| in_type | [in] The type of digest to be expanded |
| fh_desc | [in,out] Descriptor for buffer |
Definition at line 223 of file FSAL_CEPH/fsal_tools.c.
| char* CEPHFSAL_GetFSName | ( | ) |
Definition at line 48 of file FSAL_CEPH/fsal_tools.c.
| unsigned int CEPHFSAL_Handle_to_HashIndex | ( | fsal_handle_t * | exthandle, |
| unsigned int | cookie, | ||
| unsigned int | alphabet_len, | ||
| unsigned int | index_size | ||
| ) |
Generate an index in the handle table.
This function is used for hashing a FSAL handle in order to distribute entries into the hash table array.
| exthandle | [in] The handle to be hashed |
| cookie | [in] Makes it possible to have different hash value for the same handle, when cookie changes. |
| alphabet_len | [in] Parameter for polynomial hashing algorithm |
| index_size | [in] The range of hash value will be [0..index_size-1] |
Definition at line 105 of file FSAL_CEPH/fsal_tools.c.
| unsigned int CEPHFSAL_Handle_to_RBTIndex | ( | fsal_handle_t * | exthandle, |
| unsigned int | cookie | ||
| ) |
Generate a hash to locate the handle within a tree.
This function is used for generating a RBT node ID in order to identify entries into the RBT.
| exthandle | [in] The handle to be hashed |
| cookie | [in] Makes it possible to have different hash value for the same handle, when cookie changes. |
Definition at line 131 of file FSAL_CEPH/fsal_tools.c.
| int CEPHFSAL_handlecmp | ( | fsal_handle_t * | exthandle1, |
| fsal_handle_t * | exthandle2, | ||
| fsal_status_t * | status | ||
| ) |
Compare 2 handles.
This function compares two FSAL handles, returning 0 if they are to be considered identical.
| handle1 | [in] The first handle to be compared |
| handle2 | [in] The second handle to be compared |
| status | [out] Status of the compare operation |
| 0 | if handles are the same |
| Something | else if they're not |
Definition at line 68 of file FSAL_CEPH/fsal_tools.c.
| fsal_status_t CEPHFSAL_load_FS_common_parameter_from_conf | ( | config_file_t | in_config, |
| fsal_parameter_t * | out_parameter | ||
| ) |
Definition at line 428 of file FSAL_CEPH/fsal_tools.c.
| fsal_status_t CEPHFSAL_load_FS_specific_parameter_from_conf | ( | config_file_t | in_config, |
| fsal_parameter_t * | out_parameter | ||
| ) |
Definition at line 653 of file FSAL_CEPH/fsal_tools.c.
| fsal_status_t CEPHFSAL_load_FSAL_parameter_from_conf | ( | config_file_t | in_config, |
| fsal_parameter_t * | out_parameter | ||
| ) |
FSAL_load_FSAL_parameter_from_conf, FSAL_load_FS_common_parameter_from_conf, FSAL_load_FS_specific_parameter_from_conf:
Those functions initialize the FSAL init parameter structure from a configuration structure.
| in_config | (input): Structure that represents the parsed configuration file. |
| out_parameter | (ouput) FSAL initialization structure filled according to the configuration file given as parameter. |
Definition at line 355 of file FSAL_CEPH/fsal_tools.c.
| fsal_status_t CEPHFSAL_SetDefault_FS_common_parameter | ( | fsal_parameter_t * | out_parameter | ) |
Definition at line 284 of file FSAL_CEPH/fsal_tools.c.
| fsal_status_t CEPHFSAL_SetDefault_FS_specific_parameter | ( | fsal_parameter_t * | out_parameter | ) |
Definition at line 320 of file FSAL_CEPH/fsal_tools.c.
| fsal_status_t CEPHFSAL_SetDefault_FSAL_parameter | ( | fsal_parameter_t * | out_parameter | ) |
Those routines set the default parameters for FSAL init structure.
Definition at line 272 of file FSAL_CEPH/fsal_tools.c.
1.7.3