#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 "nfs_proto_tools.h"
#include "fsal_nfsv4_macros.h"
Go to the source code of this file.
Defines |
#define | FSAL_CREATE_NB_OP_ALLOC 4 |
#define | FSAL_CREATE_VAL_BUFFER 1024 |
#define | FSAL_CREATE_IDX_OP_PUTFH 0 |
#define | FSAL_CREATE_IDX_OP_OPEN_CREATE 1 |
#define | FSAL_CREATE_IDX_OP_GETFH 2 |
#define | FSAL_CREATE_IDX_OP_GETATTR 3 |
#define | FSAL_MKDIR_NB_OP_ALLOC 4 |
#define | FSAL_MKDIR_VAL_BUFFER 1024 |
#define | FSAL_MKDIR_IDX_OP_PUTFH 0 |
#define | FSAL_MKDIR_IDX_OP_MKDIR 1 |
#define | FSAL_MKDIR_IDX_OP_GETFH 2 |
#define | FSAL_MKDIR_IDX_OP_GETATTR 3 |
#define | FSAL_LINK_NB_OP_ALLOC 6 |
#define | FSAL_LINK_IDX_OP_PUTFH_TARGET 0 |
#define | FSAL_LINK_IDX_OP_SAVEFH 1 |
#define | FSAL_LINK_IDX_OP_PUTFH_DEST 2 |
#define | FSAL_LINK_IDX_OP_LINK 3 |
#define | FSAL_LINK_IDX_OP_RESTOREFH 4 |
#define | FSAL_LINK_IDX_OP_GETATTR 5 |
Functions |
fsal_status_t | PROXYFSAL_create (fsal_handle_t *parent_directory_handle, fsal_name_t *p_filename, fsal_op_context_t *context, fsal_accessmode_t accessmode, fsal_handle_t *object_handle, fsal_attrib_list_t *object_attributes) |
fsal_status_t | PROXYFSAL_mkdir (fsal_handle_t *parent_directory_handle, fsal_name_t *p_dirname, fsal_op_context_t *context, fsal_accessmode_t accessmode, fsal_handle_t *object_handle, fsal_attrib_list_t *object_attributes) |
fsal_status_t | PROXYFSAL_link (fsal_handle_t *target_handle, fsal_handle_t *dir_handle, fsal_name_t *p_link_name, fsal_op_context_t *context, fsal_attrib_list_t *attributes) |
fsal_status_t | PROXYFSAL_mknode (fsal_handle_t *parentdir_handle, fsal_name_t *p_node_name, fsal_op_context_t *p_context, fsal_accessmode_t accessmode, fsal_nodetype_t nodetype, fsal_dev_t *dev, fsal_handle_t *p_object_handle, fsal_attrib_list_t *node_attributes) |
Define Documentation
#define FSAL_CREATE_IDX_OP_GETATTR 3 |
#define FSAL_CREATE_IDX_OP_GETFH 2 |
#define FSAL_CREATE_IDX_OP_OPEN_CREATE 1 |
#define FSAL_CREATE_IDX_OP_PUTFH 0 |
#define FSAL_CREATE_NB_OP_ALLOC 4 |
#define FSAL_CREATE_VAL_BUFFER 1024 |
#define FSAL_LINK_IDX_OP_GETATTR 5 |
#define FSAL_LINK_IDX_OP_LINK 3 |
#define FSAL_LINK_IDX_OP_PUTFH_DEST 2 |
#define FSAL_LINK_IDX_OP_PUTFH_TARGET 0 |
#define FSAL_LINK_IDX_OP_RESTOREFH 4 |
#define FSAL_LINK_IDX_OP_SAVEFH 1 |
#define FSAL_LINK_NB_OP_ALLOC 6 |
#define FSAL_MKDIR_IDX_OP_GETATTR 3 |
#define FSAL_MKDIR_IDX_OP_GETFH 2 |
#define FSAL_MKDIR_IDX_OP_MKDIR 1 |
#define FSAL_MKDIR_IDX_OP_PUTFH 0 |
#define FSAL_MKDIR_NB_OP_ALLOC 4 |
#define FSAL_MKDIR_VAL_BUFFER 1024 |
Function Documentation
FSAL_create: Create a regular file.
- Parameters:
-
parent_directory_handle | (input): Handle of the parent directory where the file is to be created. |
p_filename | (input): Pointer to the name of the file to be created. |
cred | (input): Authentication context for the operation (user, export...). |
accessmode | (input): Mode for the file to be created. (the umask defined into the FSAL configuration file will be applied on it). |
object_handle | (output): Pointer to the handle of the created file. |
object_attributes | (optionnal input/output): The postop attributes of the created file. 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). Can be NULL. |
- Returns:
- Major error codes :
- ERR_FSAL_NO_ERROR (no error)
- ERR_FSAL_STALE (parent_directory_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_EXIST, ERR_FSAL_IO, ...
NB: if getting postop attributes failed, the function does not return an error but the FSAL_ATTR_RDATTR_ERR bit is set in the object_attributes->asked_attributes field.
Definition at line 80 of file FSAL_PROXY/fsal_create.c.
FSAL_link: Create a hardlink.
- Parameters:
-
target_handle | (input): Handle of the target object. |
dir_handle | (input): Pointer to the directory handle where the hardlink is to be created. |
p_link_name | (input): Pointer to the name of the hardlink to be created. |
cred | (input): Authentication context for the operation (user,...). |
accessmode | (input): Mode for the directory to be created. (the umask defined into the FSAL configuration file will be applied on it). |
attributes | (optionnal input/output): The post_operation attributes of the linked object. 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). May be NULL. |
- Returns:
- Major error codes :
- ERR_FSAL_NO_ERROR (no error)
- ERR_FSAL_STALE (target_handle or dir_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_EXIST, ERR_FSAL_IO, ...
NB: if getting postop attributes failed, the function does not return an error but the FSAL_ATTR_RDATTR_ERR bit is set in the attributes->asked_attributes field.
Definition at line 536 of file FSAL_PROXY/fsal_create.c.
FSAL_mkdir: Create a directory.
- Parameters:
-
parent_directory_handle | (input): Handle of the parent directory where the subdirectory is to be created. |
p_dirname | (input): Pointer to the name of the directory to be created. |
cred | (input): Authentication context for the operation (user,...). |
accessmode | (input): Mode for the directory to be created. (the umask defined into the FSAL configuration file will be applied on it). |
object_handle | (output): Pointer to the handle of the created directory. |
object_attributes | (optionnal input/output): The attributes of the created directory. 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). May be NULL. |
- Returns:
- Major error codes :
- ERR_FSAL_NO_ERROR (no error)
- ERR_FSAL_STALE (parent_directory_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_EXIST, ERR_FSAL_IO, ...
NB: if getting postop attributes failed, the function does not return an error but the FSAL_ATTR_RDATTR_ERR bit is set in the object_attributes->asked_attributes field.
Definition at line 334 of file FSAL_PROXY/fsal_create.c.
FSAL_mknode: Create a special object in the filesystem. Not supported in upper layers in this GANESHA's version.
- Returns:
- ERR_FSAL_NOTSUPP.
Definition at line 669 of file FSAL_PROXY/fsal_create.c.