nfs-ganesha 1.4
Functions

fsal_create.c File Reference

#include "fsal.h"
#include "fsal_internal.h"
#include "fsal_convert.h"
#include "fsal_common.h"
#include "namespace.h"
#include <string.h>

Go to the source code of this file.

Functions

fsal_status_t FUSEFSAL_create (fsal_handle_t *parent_handle, fsal_name_t *p_filename, fsal_op_context_t *p_context, fsal_accessmode_t accessmode, fsal_handle_t *obj_handle, fsal_attrib_list_t *object_attributes)
fsal_status_t FUSEFSAL_mkdir (fsal_handle_t *parent_handle, fsal_name_t *p_dirname, fsal_op_context_t *p_context, fsal_accessmode_t accessmode, fsal_handle_t *obj_handle, fsal_attrib_list_t *object_attributes)
fsal_status_t FUSEFSAL_link (fsal_handle_t *target, fsal_handle_t *dir_hdl, fsal_name_t *p_link_name, fsal_op_context_t *p_context, fsal_attrib_list_t *attributes)
fsal_status_t FUSEFSAL_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)

Function Documentation

fsal_status_t FUSEFSAL_create ( fsal_handle_t parent_handle,
fsal_name_t p_filename,
fsal_op_context_t p_context,
fsal_accessmode_t  accessmode,
fsal_handle_t obj_handle,
fsal_attrib_list_t object_attributes 
)

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 62 of file FSAL_FUSELIKE/fsal_create.c.

fsal_status_t FUSEFSAL_link ( fsal_handle_t target,
fsal_handle_t dir_hdl,
fsal_name_t p_link_name,
fsal_op_context_t p_context,
fsal_attrib_list_t attributes 
)

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 384 of file FSAL_FUSELIKE/fsal_create.c.

fsal_status_t FUSEFSAL_mkdir ( fsal_handle_t parent_handle,
fsal_name_t p_dirname,
fsal_op_context_t p_context,
fsal_accessmode_t  accessmode,
fsal_handle_t obj_handle,
fsal_attrib_list_t object_attributes 
)

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 243 of file FSAL_FUSELIKE/fsal_create.c.

fsal_status_t FUSEFSAL_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 
)

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 482 of file FSAL_FUSELIKE/fsal_create.c.