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 "HPSSclapiExt/hpssclapiext.h"
#include <hpss_errno.h>

Go to the source code of this file.

Functions

fsal_status_t HPSSFSAL_create (hpssfsal_handle_t *parent_directory_handle, fsal_name_t *p_filename, hpssfsal_op_context_t *p_context, fsal_accessmode_t accessmode, hpssfsal_handle_t *object_handle, fsal_attrib_list_t *object_attributes)
fsal_status_t HPSSFSAL_mkdir (hpssfsal_handle_t *parent_directory_handle, fsal_name_t *p_dirname, hpssfsal_op_context_t *p_context, fsal_accessmode_t accessmode, hpssfsal_handle_t *object_handle, fsal_attrib_list_t *object_attributes)
fsal_status_t HPSSFSAL_link (hpssfsal_handle_t *target_handle, hpssfsal_handle_t *dir_handle, fsal_name_t *p_link_name, hpssfsal_op_context_t *p_context, fsal_attrib_list_t *attributes)
fsal_status_t HPSSFSAL_mknode (hpssfsal_handle_t *parentdir_handle, fsal_name_t *p_node_name, hpssfsal_op_context_t *p_context, fsal_accessmode_t accessmode, fsal_nodetype_t nodetype, fsal_dev_t *dev, hpssfsal_handle_t *p_object_handle, fsal_attrib_list_t *node_attributes)

Function Documentation

fsal_status_t HPSSFSAL_create ( hpssfsal_handle_t parent_directory_handle,
fsal_name_t p_filename,
hpssfsal_op_context_t p_context,
fsal_accessmode_t  accessmode,
hpssfsal_handle_t object_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_HPSS/fsal_create.c.

fsal_status_t HPSSFSAL_link ( hpssfsal_handle_t target_handle,
hpssfsal_handle_t dir_handle,
fsal_name_t p_link_name,
hpssfsal_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 335 of file FSAL_HPSS/fsal_create.c.

fsal_status_t HPSSFSAL_mkdir ( hpssfsal_handle_t parent_directory_handle,
fsal_name_t p_dirname,
hpssfsal_op_context_t p_context,
fsal_accessmode_t  accessmode,
hpssfsal_handle_t object_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 217 of file FSAL_HPSS/fsal_create.c.

fsal_status_t HPSSFSAL_mknode ( hpssfsal_handle_t parentdir_handle,
fsal_name_t p_node_name,
hpssfsal_op_context_t p_context,
fsal_accessmode_t  accessmode,
fsal_nodetype_t  nodetype,
fsal_dev_t dev,
hpssfsal_handle_t p_object_handle,
fsal_attrib_list_t node_attributes 
)

FSAL_mknode: Create a special object in the filesystem. Not supported upon HPSS.

Returns:
ERR_FSAL_NOTSUPP.

Definition at line 418 of file FSAL_HPSS/fsal_create.c.