nfs-ganesha 1.4
Functions

fsal_convert.h File Reference

#include "fsal.h"

Go to the source code of this file.

Functions

int fsal2posix_testperm (fsal_accessflags_t testperm)
int fuse2fsal_error (int errorcode, int noent_is_stale)
fsal_status_t posix2fsal_attributes (struct stat *p_buffstat, fsal_attrib_list_t *p_fsalattr_out)
fsal_nodetype_t posix2fsal_type (mode_t posix_type_in)
fsal_time_t posix2fsal_time (time_t tsec)
fsal_fsid_t posix2fsal_fsid (dev_t posix_devid)
fsal_dev_t posix2fsal_devt (dev_t posix_devid)

Function Documentation

int fsal2posix_testperm ( fsal_accessflags_t  testperm)

fsal2posix_testperm: Convert FSAL permission flags to Posix permission flags.

Parameters:
testperm(input): The FSAL permission flags to be tested.
Returns:
The POSIX permission flags to be tested.

Definition at line 37 of file fsal_convert.c.

int fuse2fsal_error ( int  errorcode,
int  noent_is_stale 
)

posix2fsal_error : Convert POSIX error codes to FSAL error codes.

Parameters:
posix_errorcode(input): The error code returned from POSIX.
Returns:
The FSAL error code associated to posix_errorcode.

Todo:
: The EBADF error also happens when file is opened for reading, and we try writting in it. In this case, we return ERR_FSAL_NOT_OPENED, but it doesn't seems to be a correct error translation.
Warning:
AIX returns EEXIST where BSD uses ENOTEMPTY; We want ENOTEMPTY to be interpreted anyway on AIX plateforms. Thus, we explicitely write its value (87).

Definition at line 38 of file FSAL_FUSELIKE/fsal_convert.c.

fsal_status_t posix2fsal_attributes ( struct stat *  p_buffstat,
fsal_attrib_list_t p_fsalattr_out 
)

Converts POSIX attributes (struct stat) to FSAL attributes (fsal_attrib_list_t)

Definition at line 229 of file FSAL_CEPH/fsal_convert.c.

fsal_dev_t posix2fsal_devt ( dev_t  posix_devid)

Definition at line 211 of file fsal_convert.c.

fsal_fsid_t posix2fsal_fsid ( dev_t  posix_devid)

converts posix fsid to fsal FSid.

Definition at line 199 of file fsal_convert.c.

fsal_time_t posix2fsal_time ( time_t  tsec)
fsal_nodetype_t posix2fsal_type ( mode_t  posix_type_in)

posix2fsal_type: Convert posix object type to FSAL node type.

Parameters:
posix_type_in(input): The POSIX object type.
Returns:
- The FSAL node type associated to posix_type_in.
  • -1 if the input type is unknown.

Definition at line 155 of file fsal_convert.c.