nfs-ganesha 1.4
Classes | Defines | Typedefs | Functions

handle_mapping.h File Reference

This module is used for managing a persistent map between PROXY FSAL handles (including NFSv4 handles from server) and nfsv2 and v3 handles digests (sent to client). More...

#include "fsal.h"

Go to the source code of this file.

Classes

struct  handle_map_param__
struct  nfs23_map_handle__

Defines

#define HANDLEMAP_SUCCESS   0
#define HANDLEMAP_STALE   1
#define HANDLEMAP_INCONSISTENCY   2
#define HANDLEMAP_DB_ERROR   3
#define HANDLEMAP_SYSTEM_ERROR   4
#define HANDLEMAP_INTERNAL_ERROR   5
#define HANDLEMAP_INVALID_PARAM   6
#define HANDLEMAP_HASHTABLE_ERROR   7
#define HANDLEMAP_EXISTS   8

Typedefs

typedef struct handle_map_param__ handle_map_param_t
typedef struct nfs23_map_handle__ nfs23_map_handle_t

Functions

int HandleMap_Init (const handle_map_param_t *p_param)
int HandleMap_GetFH (nfs23_map_handle_t *p_in_nfs23_digest, fsal_handle_t *p_out_fsal_handle)
int HandleMap_SetFH (nfs23_map_handle_t *p_in_nfs23_digest, fsal_handle_t *p_in_handle)
int HandleMap_DelFH (nfs23_map_handle_t *p_in_nfs23_digest)
int HandleMap_Flush ()

Detailed Description

This module is used for managing a persistent map between PROXY FSAL handles (including NFSv4 handles from server) and nfsv2 and v3 handles digests (sent to client).

Definition in file handle_mapping.h.


Define Documentation

#define HANDLEMAP_DB_ERROR   3

Definition at line 82 of file handle_mapping.h.

#define HANDLEMAP_EXISTS   8

Definition at line 87 of file handle_mapping.h.

#define HANDLEMAP_HASHTABLE_ERROR   7

Definition at line 86 of file handle_mapping.h.

#define HANDLEMAP_INCONSISTENCY   2

Definition at line 81 of file handle_mapping.h.

#define HANDLEMAP_INTERNAL_ERROR   5

Definition at line 84 of file handle_mapping.h.

#define HANDLEMAP_INVALID_PARAM   6

Definition at line 85 of file handle_mapping.h.

#define HANDLEMAP_STALE   1

Definition at line 80 of file handle_mapping.h.

#define HANDLEMAP_SUCCESS   0

Definition at line 79 of file handle_mapping.h.

#define HANDLEMAP_SYSTEM_ERROR   4

Definition at line 83 of file handle_mapping.h.


Typedef Documentation


Function Documentation

int HandleMap_DelFH ( nfs23_map_handle_t p_in_nfs23_digest)

Remove a handle from the map when it was removed from the filesystem or when it is stale.

Definition at line 383 of file handle_mapping.c.

int HandleMap_Flush ( )

Flush pending database operations (before stopping the server).

Definition at line 423 of file handle_mapping.c.

int HandleMap_GetFH ( nfs23_map_handle_t p_in_nfs23_digest,
fsal_handle_t p_out_fsal_handle 
)

Retrieves a full fsal_handle from a NFS2/3 digest.

Parameters:
p_nfs23_digest[in] the NFS2/3 handle digest
p_out_fsal_handle[out] the fsal handle to be retrieved
Returns:
HANDLEMAP_SUCCESS if the handle is available, HANDLEMAP_STALE if the disgest is unknown or the handle has been deleted

Definition at line 324 of file handle_mapping.c.

int HandleMap_Init ( const handle_map_param_t p_param)

Init handle mapping module. Reloads the content of the mapping files it they exist, else it creates them.

Returns:
0 if OK, an error code else.

Init handle mapping module. Reloads the content of the mapping files it they exist, else it creates them.

Returns:
0 if OK, a posix error code else.

Definition at line 249 of file handle_mapping.c.

int HandleMap_SetFH ( nfs23_map_handle_t p_in_nfs23_digest,
fsal_handle_t p_in_handle 
)

Save the handle association if it was unknown.

Definition at line 356 of file handle_mapping.c.