nfs-ganesha 1.4
Defines | Functions

fsal_rcp.c File Reference

#include "fsal.h"
#include "fsal_internal.h"
#include "fsal_convert.h"
#include "abstract_mem.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

Go to the source code of this file.

Defines

#define RCP_BUFFER_SIZE   1048576

Functions

fsal_status_t FSAL_rcp (fsal_handle_t *filehandle, fsal_op_context_t *p_context, fsal_path_t *p_local_path, fsal_rcpflag_t transfer_opt)

Define Documentation

#define RCP_BUFFER_SIZE   1048576

Function Documentation

fsal_status_t FSAL_rcp ( fsal_handle_t filehandle,
fsal_op_context_t p_context,
fsal_path_t p_local_path,
fsal_rcpflag_t  transfer_opt 
)

FSAL_rcp: Copy an HPSS file to/from a local filesystem.

Parameters:
filehandle(input): Handle of the HPSS file to be copied.
p_context(input): Authentication context for the operation (user,...).
p_local_path(input): Path of the file in the local filesystem.
transfer_opt(input): Flags that indicate transfer direction and options. This consists of an inclusive OR between the following values :

  • FSAL_RCP_FS_TO_LOCAL: Copy the file from the filesystem to a local path.
  • FSAL_RCP_LOCAL_TO_FS: Copy the file from local path to the filesystem.
  • FSAL_RCP_LOCAL_CREAT: Create the target local file if it doesn't exist.
  • FSAL_RCP_LOCAL_EXCL: Produce an error if the target local file already exists.
Returns:
Major error codes :
  • ERR_FSAL_NO_ERROR (no error)
  • ERR_FSAL_ACCESS (user doesn't have the permissions for opening the file)
  • ERR_FSAL_STALE (filehandle does not address an existing object)
  • ERR_FSAL_INVAL (filehandle does not address a regular file, or tranfert options are conflicting)
  • ERR_FSAL_FAULT (a NULL pointer was passed as mandatory argument)
  • Other error codes can be returned : ERR_FSAL_IO, ERR_FSAL_NOSPC, ERR_FSAL_DQUOT...

Definition at line 60 of file FSAL_TEMPLATE/fsal_rcp.c.