nfs-ganesha 1.4
Defines | Functions | Variables

fsal_convert.c File Reference

#include "fsal_convert.h"
#include "fsal_internal.h"
#include "nfs4_acls.h"
#include "gpfs.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <sys/resource.h>

Go to the source code of this file.

Defines

#define MAX_2(x, y)   ( (x) > (y) ? (x) : (y) )
#define MAX_3(x, y, z)   ( (x) > (y) ? MAX_2((x),(z)) : MAX_2((y),(z)) )

Functions

int posix2fsal_error (int posix_errorcode)
int fsal2posix_openflags (fsal_openflags_t fsal_flags, int *p_posix_flags)
fsal_status_t posix2fsal_attributes (struct stat *p_buffstat, fsal_attrib_list_t *p_fsalattr_out)
fsal_status_t gpfsfsal_xstat_2_fsal_attributes (gpfsfsal_xstat_t *p_buffxstat, fsal_attrib_list_t *p_fsalattr_out)

Variables

uint32_t open_fd_count

Define Documentation

#define MAX_2 (   x,
 
)    ( (x) > (y) ? (x) : (y) )

Definition at line 29 of file FSAL_GPFS/fsal_convert.c.

#define MAX_3 (   x,
  y,
 
)    ( (x) > (y) ? MAX_2((x),(z)) : MAX_2((y),(z)) )

Definition at line 30 of file FSAL_GPFS/fsal_convert.c.


Function Documentation

int fsal2posix_openflags ( fsal_openflags_t  fsal_flags,
int *  p_posix_flags 
)

fsal2posix_openflags: Convert FSAL open flags to Posix open flags.

Parameters:
fsal_flags(input): The FSAL open flags to be translated.
p_hpss_flags(output): Pointer to the POSIX open flags.
Returns:
- ERR_FSAL_NO_ERROR (no error).
  • ERR_FSAL_FAULT (p_hpss_flags is a NULL pointer).
  • ERR_FSAL_INVAL (invalid or incompatible input flags).

Definition at line 216 of file FSAL_GPFS/fsal_convert.c.

fsal_status_t gpfsfsal_xstat_2_fsal_attributes ( gpfsfsal_xstat_t p_buffxstat,
fsal_attrib_list_t p_fsalattr_out 
)

Definition at line 401 of file FSAL_GPFS/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 271 of file FSAL_GPFS/fsal_convert.c.

int posix2fsal_error ( int  posix_errorcode)

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 49 of file FSAL_GPFS/fsal_convert.c.


Variable Documentation

This is a global counter of files opened by cache_inode. This is preliminary expected to go away. Problems with this method are that it overcounts file descriptors for FSALs that don't use them for open files, and, under the Lieb Rearchitecture, FSALs will be responsible for caching their own file descriptors, with interfaces for Cache_Inode to interrogate them as to usage or instruct them to close them.

Definition at line 178 of file cache_inode_lru.c.