#include <string.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include "nfs4.h"
#include "fsal_internal.h"
#include "fsal_convert.h"
#include "fsal_common.h"
#include "nfs_proto_functions.h"
#include "fsal_nfsv4_macros.h"
Go to the source code of this file.
Defines |
#define | FSAL_LOOKUP_NB_OP_ALLOC 4 |
#define | FSAL_LOOKUP_IDX_OP_PUTROOTFH 0 |
#define | FSAL_LOOKUP_IDX_OP_GETATTR_ROOT 1 |
#define | FSAL_LOOKUP_IDX_OP_GETFH_ROOT 2 |
#define | FSAL_LOOKUP_IDX_OP_DOT_PUTFH 0 |
#define | FSAL_LOOKUP_IDX_OP_DOT_GETATTR 1 |
#define | FSAL_LOOKUP_IDX_OP_DOT_GETFH 2 |
#define | FSAL_LOOKUP_IDX_OP_DOT_DOT_PUTFH 0 |
#define | FSAL_LOOKUP_IDX_OP_DOT_DOT_LOOKUPP 1 |
#define | FSAL_LOOKUP_IDX_OP_DOT_DOT_GETATTR 2 |
#define | FSAL_LOOKUP_IDX_OP_DOT_DOT_GETFH 3 |
#define | FSAL_LOOKUP_IDX_OP_PUTFH 0 |
#define | FSAL_LOOKUP_IDX_OP_LOOKUP 1 |
#define | FSAL_LOOKUP_IDX_OP_GETATTR 2 |
#define | FSAL_LOOKUP_IDX_OP_GETFH 3 |
Functions |
fsal_status_t | PROXYFSAL_lookup (fsal_handle_t *parent_directory_handle, fsal_name_t *p_filename, fsal_op_context_t *context, fsal_handle_t *object_handle, fsal_attrib_list_t *object_attributes) |
fsal_status_t | PROXYFSAL_lookupJunction (fsal_handle_t *p_junction_handle, fsal_op_context_t *p_context, fsal_handle_t *p_fsoot_handle, fsal_attrib_list_t *p_fsroot_attributes) |
fsal_status_t | PROXYFSAL_lookupPath (fsal_path_t *p_path, fsal_op_context_t *p_context, fsal_handle_t *object_handle, fsal_attrib_list_t *object_attributes) |
Variables |
struct timeval | timeout |
Define Documentation
#define FSAL_LOOKUP_IDX_OP_DOT_DOT_GETATTR 2 |
#define FSAL_LOOKUP_IDX_OP_DOT_DOT_GETFH 3 |
#define FSAL_LOOKUP_IDX_OP_DOT_DOT_LOOKUPP 1 |
#define FSAL_LOOKUP_IDX_OP_DOT_DOT_PUTFH 0 |
#define FSAL_LOOKUP_IDX_OP_DOT_GETATTR 1 |
#define FSAL_LOOKUP_IDX_OP_DOT_GETFH 2 |
#define FSAL_LOOKUP_IDX_OP_DOT_PUTFH 0 |
#define FSAL_LOOKUP_IDX_OP_GETATTR 2 |
#define FSAL_LOOKUP_IDX_OP_GETATTR_ROOT 1 |
#define FSAL_LOOKUP_IDX_OP_GETFH 3 |
#define FSAL_LOOKUP_IDX_OP_GETFH_ROOT 2 |
#define FSAL_LOOKUP_IDX_OP_LOOKUP 1 |
#define FSAL_LOOKUP_IDX_OP_PUTFH 0 |
#define FSAL_LOOKUP_IDX_OP_PUTROOTFH 0 |
#define FSAL_LOOKUP_NB_OP_ALLOC 4 |
Function Documentation
PROXYFSAL_lookupJunction : Get the fileset root for a junction.
- Parameters:
-
p_junction_handle | (input) Handle of the junction to be looked up. |
cred | (input) Authentication context for the operation (user,...). |
p_fsroot_handle | (output) The handle of root directory of the fileset. |
p_fsroot_attributes | (optional input/output) Pointer to the attributes of the root directory for the fileset. As input, it defines the attributes that the caller wants to retrieve (by positioning flags into this structure) and the output is built considering this input (it fills the structure according to the flags it contains). It can be NULL (increases performances). |
- Returns:
- Major error codes :
- ERR_FSAL_NO_ERROR (no error)
- ERR_FSAL_STALE (p_junction_handle does not address an existing object)
- ERR_FSAL_FAULT (a NULL pointer was passed as mandatory argument)
- Other error codes can be returned : ERR_FSAL_ACCESS, ERR_FSAL_IO, ...
Definition at line 394 of file FSAL_PROXY/fsal_lookup.c.
PROXYFSAL_lookupPath : Looks up for an object into the namespace.
Note : if path equals "/", this retrieves root's handle.
- Parameters:
-
path | (input) The path of the object to find. |
p_context | (input) Authentication context for the operation (user,...). |
object_handle | (output) The handle of the object corresponding to filename. |
object_attributes | (optional input/output) Pointer to the attributes of the object we found. As input, it defines the attributes that the caller wants to retrieve (by positioning flags into this structure) and the output is built considering this input (it fills the structure according to the flags it contains). It can be NULL (increases performances). |
- Returns:
- Major error codes :
- ERR_FSAL_NO_ERROR (no error)
- ERR_FSAL_FAULT (a NULL pointer was passed as mandatory argument)
- ERR_FSAL_INVAL (the path argument is not absolute)
- ERR_FSAL_NOENT (an element in the path does not exist)
- ERR_FSAL_NOTDIR (an element in the path is not a directory)
- ERR_FSAL_XDEV (tried to cross a filesystem junction, whereas is has not been authorized in the server configuration - FSAL::auth_xdev_export parameter)
- Other error codes can be returned : ERR_FSAL_ACCESS, ERR_FSAL_IO, ...
Definition at line 466 of file FSAL_PROXY/fsal_lookup.c.
Variable Documentation
PROXYFSAL_lookup : Looks up for an object into a directory.
Note : if parent handle and filename are NULL, this retrieves root's handle.
- Parameters:
-
parent_directory_handle | (input) Handle of the parent directory to search the object in. |
filename | (input) The name of the object to find. |
p_context | (input) Authentication context for the operation (user,...). |
object_handle | (output) The handle of the object corresponding to filename. |
object_attributes | (optional input/output) Pointer to the attributes of the object we found. As input, it defines the attributes that the caller wants to retrieve (by positioning flags into this structure) and the output is built considering this input (it fills the structure according to the flags it contains). It can be NULL (increases performances). |
- Returns:
- Major error codes :
- ERR_FSAL_NO_ERROR (no error)
- ERR_FSAL_STALE (parent_directory_handle does not address an existing object)
- ERR_FSAL_NOTDIR (parent_directory_handle does not address a directory)
- ERR_FSAL_NOENT (the object designated by p_filename does not exist)
- ERR_FSAL_XDEV (tried to operate a lookup on a filesystem junction. Use PROXYFSAL_lookupJunction instead)
- ERR_FSAL_FAULT (a NULL pointer was passed as mandatory argument)
- Other error codes can be returned : ERR_FSAL_ACCESS, ERR_FSAL_IO, ...