nfs-ganesha 1.4
|
#include "fsal.h"
#include <sys/stat.h>
#include "fsal_up.h"
#include "FSAL/common_functions.h"
Go to the source code of this file.
#define GPFS_SUPPORTED_ATTRIBUTES |
( \ FSAL_ATTR_SUPPATTR | FSAL_ATTR_TYPE | FSAL_ATTR_SIZE | \ FSAL_ATTR_FSID | FSAL_ATTR_FILEID | \ FSAL_ATTR_MODE | FSAL_ATTR_NUMLINKS | FSAL_ATTR_OWNER | \ FSAL_ATTR_GROUP | FSAL_ATTR_ATIME | FSAL_ATTR_RAWDEV | \ FSAL_ATTR_CTIME | FSAL_ATTR_MTIME | FSAL_ATTR_SPACEUSED | \ FSAL_ATTR_CHGTIME | FSAL_ATTR_ACL )
Definition at line 41 of file FSAL_GPFS/fsal_internal.h.
fsal_status_t fsal_check_access_by_mode | ( | fsal_op_context_t * | p_context, |
fsal_accessflags_t | access_type, | ||
struct stat * | p_buffstat | ||
) |
Definition at line 1244 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_get_xstat_by_handle | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_handle, | ||
gpfsfsal_xstat_t * | p_buffxstat | ||
) |
Definition at line 1115 of file FSAL_GPFS/fsal_internal.c.
void fsal_increment_nbcall | ( | int | function_index, |
fsal_status_t | status | ||
) |
Increments the number of calls for a function.
fsal_increment_nbcall: Updates fonction call statistics.
function_index | (input): Index of the function whom number of call is to be incremented. |
status | (input): Status the function returned. |
Definition at line 135 of file FSAL_CEPH/fsal_internal.c.
fsal_status_t fsal_internal_access | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_handle, | ||
fsal_accessflags_t | access_type, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
Definition at line 1032 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_internal_create | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_dir_handle, | ||
fsal_name_t * | p_stat_name, | ||
mode_t | mode, | ||
dev_t | dev, | ||
fsal_handle_t * | p_new_handle, | ||
struct stat * | buf | ||
) |
fsal_internal_create: Create a file/directory by name
p_context | (input): Pointer to current context. Used to get export root fd. |
p_dir_handle | (input): file handle of directory |
name | (input): name to create |
mode | & dev (input): file type and dev for mknode |
fh | & stat (outut): file handle of new file and attributes |
Definition at line 871 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_internal_fd2handle | ( | int | fd, |
fsal_handle_t * | handle | ||
) |
fsal_internal_fd2handle: convert an fd to a handle
fd | (input): Open file descriptor for target file |
p_handle | (output): The handle that is found and returned |
Definition at line 663 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_internal_get_fh | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_dir_fh, | ||
fsal_name_t * | p_fsalname, | ||
fsal_handle_t * | p_out_fh | ||
) |
Gets a file handle from a parent handle and name
fsal_internal_get_handle: Create a handle from a directory handle and filename
pcontext | (input): A context pointer for the root of the current export |
p_dir_handle | (input): The handle for the parent directory |
p_fsalname | (input): Name of the file |
p_handle | (output): The handle that is found and returned |
Definition at line 616 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_internal_get_handle | ( | fsal_op_context_t * | p_context, |
fsal_path_t * | p_fsalpath, | ||
fsal_handle_t * | p_handle | ||
) |
Get the handle for a path (posix or fid path)
fsal_internal_get_handle: Create a handle from a file path
pcontext | (input): A context pointer for the root of the current export |
p_fsalpath | (input): Full path to the file |
p_handle | (output): The handle that is found and returned |
Definition at line 524 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_internal_get_handle_at | ( | int | dfd, |
fsal_name_t * | p_fsalname, | ||
fsal_handle_t * | p_handle | ||
) |
fsal_internal_get_handle_at: Create a handle from a directory pointer and filename
dfd | (input): Open directory handle |
p_fsalname | (input): Name of the file |
p_handle | (output): The handle that is found and returned |
Definition at line 569 of file FSAL_GPFS/fsal_internal.c.
void fsal_internal_getstats | ( | fsal_statistics_t * | output_stats | ) |
Retrieves current thread statistics.
fsal_internal_getstats: (For internal use in the FSAL). Retrieve call statistics for current thread.
output_stats | (output): Pointer to the call statistics structure. |
Definition at line 211 of file FSAL_CEPH/fsal_internal.c.
fsal_status_t fsal_internal_handle2fd | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | phandle, | ||
int * | pfd, | ||
int | oflags | ||
) |
Gets a fd from a handle
fsal_internal_handle2fd: Open a file by handle within an export.
p_context | (input): Pointer to current context. Used to get export root fd. |
phandle | (input): Opaque filehandle |
pfd | (output): File descriptor openned by the function |
oflags | (input): Flags to open the file with |
Definition at line 451 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_internal_handle2fd_at | ( | int | dirfd, |
fsal_handle_t * | phandle, | ||
int * | pfd, | ||
int | oflags | ||
) |
fsal_internal_handle2fd_at: Open a file by handle from in an open directory
dirfd | (input): Open file descriptor of parent directory |
phandle | (input): Opaque filehandle |
pfd | (output): File descriptor openned by the function |
oflags | (input): Flags to open the file with |
Definition at line 486 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_internal_init_global | ( | fsal_init_info_t * | fsal_info, |
fs_common_initinfo_t * | fs_common_info, | ||
fs_specific_initinfo_t * | fs_specific_info | ||
) |
This function initializes shared variables of the FSAL.
Definition at line 490 of file FSAL_CEPH/fsal_internal.c.
fsal_status_t fsal_internal_link_at | ( | int | srcfd, |
int | dirfd, | ||
char * | name | ||
) |
fsal_internal_link_at: Create a link based on a file descriptor, dirfd, and new name
srcfd | (input): file descriptor of source file |
dirfd | (input): file descriptor of target directory |
name | (input): name for the new file |
Definition at line 705 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_internal_link_fh | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_target_handle, | ||
fsal_handle_t * | p_dir_handle, | ||
fsal_name_t * | p_link_name | ||
) |
fsal_internal_link_fh: Create a link based on a file fh, dir fh, and new name
p_context | (input): Pointer to current context. Used to get export root fd. |
p_target_handle | (input): file handle of target file |
p_dir_handle | (input): file handle of source directory |
name | (input): name for the new file |
Definition at line 741 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_internal_rename_fh | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_old_handle, | ||
fsal_handle_t * | p_new_handle, | ||
fsal_name_t * | p_old_name, | ||
fsal_name_t * | p_new_name | ||
) |
fsal_internal_rename_fh: Rename old file name to new name
p_context | (input): Pointer to current context. Used to get export root fd. |
p_old_handle | (input): file handle of old file |
p_new_handle | (input): file handle of new directory |
name | (input): name for the old file |
name | (input): name for the new file |
Definition at line 924 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_internal_stat_name | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_dir_handle, | ||
fsal_name_t * | p_stat_name, | ||
struct stat * | buf | ||
) |
fsal_internal_stat_name: Stat a file by name
p_context | (input): Pointer to current context. Used to get export root fd. |
p_dir_handle | (input): file handle of directory |
name | (input): name to stat |
Definition at line 783 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_internal_testAccess | ( | fsal_op_context_t * | p_context, |
fsal_accessflags_t | access_type, | ||
struct stat * | p_buffstat, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
test the access to a file from its POSIX attributes (struct stat) OR its FSAL attributes (fsal_attrib_list_t).
Definition at line 345 of file FSAL_CEPH/fsal_internal.c.
fsal_status_t fsal_internal_unlink | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_dir_handle, | ||
fsal_name_t * | p_stat_name, | ||
struct stat * | buf | ||
) |
fsal_internal_unlink: Unlink a file/directory by name
p_context | (input): Pointer to current context. Used to get export root fd. |
p_dir_handle | (input): file handle of directory |
name | (input): name to unlink |
Definition at line 825 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_readlink_by_handle | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_handle, | ||
char * | __buf, | ||
int | maxlen | ||
) |
Access a link by a file handle.
fsal_readlink_by_handle: Reads the contents of the link
Definition at line 967 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_set_xstat_by_handle | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_handle, | ||
int | attr_valid, | ||
int | attr_changed, | ||
gpfsfsal_xstat_t * | p_buffxstat | ||
) |
Definition at line 1187 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_stat_by_handle | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_handle, | ||
struct stat * | buf | ||
) |
fsal_stat_by_handle: get the stat value
Definition at line 1088 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t fsal_trucate_by_handle | ( | fsal_op_context_t * | p_context, |
fsal_handle_t * | p_handle, | ||
u_int64_t | size | ||
) |
Definition at line 1224 of file FSAL_GPFS/fsal_internal.c.
fsal_status_t GPFSFSAL_access | ( | fsal_handle_t * | p_object_handle, |
fsal_op_context_t * | p_context, | ||
fsal_accessflags_t | access_type, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
FSAL_access : Tests whether the user or entity identified by its cred can access the object identified by object_handle, as indicated by the access_type parameters.
object_handle | (input): The handle of the object to test permissions on. |
cred | (input): Authentication context for the operation (user,...). |
access_type | (input): Indicates the permissions to test. This is an inclusive OR of the permissions to be checked for the user identified by cred. Permissions constants are :
|
object_attributes | (optional input/output): The post operation attributes for the 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. |
Definition at line 74 of file FSAL_GPFS/fsal_access.c.
fsal_status_t GPFSFSAL_BuildExportContext | ( | fsal_export_context_t * | export_context, |
fsal_path_t * | p_export_path, | ||
char * | fs_specific_options | ||
) |
build the export entry
Definition at line 32 of file FSAL_GPFS/fsal_context.c.
fsal_status_t GPFSFSAL_CleanUpExportContext | ( | fsal_export_context_t * | p_export_context | ) |
FSAL_CleanUpExportContext : this will clean up and state in an export that was created during the BuildExportContext phase. For many FSALs this may be a noop.
p_export_context | (in, gpfsfsal_export_context_t) |
Definition at line 137 of file FSAL_GPFS/fsal_context.c.
fsal_status_t GPFSFSAL_close | ( | fsal_file_t * | p_file_descriptor | ) |
FSAL_close: Free the resources allocated by the FSAL_open call.
file_descriptor | (input): The file descriptor returned by FSAL_open. |
Definition at line 471 of file FSAL_GPFS/fsal_fileop.c.
fsal_status_t GPFSFSAL_closedir | ( | fsal_dir_t * | p_dir_descriptor | ) |
FSAL_closedir : Free the resources allocated for reading directory entries.
dir_descriptor | (input): Pointer to a directory descriptor filled by FSAL_opendir. |
Definition at line 315 of file FSAL_GPFS/fsal_dirs.c.
fsal_status_t GPFSFSAL_commit | ( | fsal_file_t * | p_file_descriptor, |
fsal_off_t | offset, | ||
fsal_size_t | length | ||
) |
FSAL_commit: This function is used for processing stable writes and COMMIT requests. Calling this function makes sure the changes to a specific file are written to disk rather than kept in memory.
file_descriptor | (input): The file descriptor returned by FSAL_open. |
offset,: | The starting offset for the portion of file to be synced |
length,: | The length for the portion of file to be synced. |
Definition at line 519 of file FSAL_GPFS/fsal_fileop.c.
fsal_status_t GPFSFSAL_create | ( | fsal_handle_t * | p_parent_directory_handle, |
fsal_name_t * | p_filename, | ||
fsal_op_context_t * | p_context, | ||
fsal_accessmode_t | accessmode, | ||
fsal_handle_t * | p_object_handle, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
FSAL_create: Create a regular file.
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,...). |
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 | (optional input/output): The 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). May be NULL. |
Definition at line 53 of file FSAL_GPFS/fsal_create.c.
fsal_status_t GPFSFSAL_DigestHandle | ( | fsal_export_context_t * | exp_context, |
fsal_digesttype_t | output_type, | ||
fsal_handle_t * | in_fsal_handle, | ||
struct fsal_handle_desc * | fh_desc | ||
) |
GPFSFSAL_DigestHandle : Convert an fsal_handle_t to a buffer to be included into NFS handles, or another digest.
output_type | (input): Indicates the type of digest to do. |
in_fsal_handle | (input): The handle to be converted to digest. |
Definition at line 210 of file FSAL_GPFS/fsal_tools.c.
fsal_status_t GPFSFSAL_dynamic_fsinfo | ( | fsal_handle_t * | p_filehandle, |
fsal_op_context_t * | p_context, | ||
fsal_dynamicfsinfo_t * | p_dynamicinfo | ||
) |
FSAL_dynamic_fsinfo: Return dynamic filesystem info such as used size, free size, number of objects...
filehandle | (input): Handle of an object in the filesystem whom info is to be retrieved. |
cred | (input): Authentication context for the operation (user,...). |
dynamicinfo | (output): Pointer to the static info of the filesystem. |
Definition at line 41 of file FSAL_GPFS/fsal_fsinfo.c.
fsal_status_t GPFSFSAL_ExpandHandle | ( | fsal_export_context_t * | exp_context, |
fsal_digesttype_t | in_type, | ||
struct fsal_handle_desc * | fh_desc | ||
) |
FSAL_ExpandHandle : Convert a buffer extracted from NFS handles to an FSAL handle. All we do here is adjust the descriptor length based on knowing the internals of struct gpfs_file_handle and let the upper level do handle memcpy, hash lookup and/or compare. No copies anymore.
in_type | (input): Indicates the type of digest to be expanded. |
fh_desc | (input/output): digest descriptor. returns length to be copied |
Definition at line 299 of file FSAL_GPFS/fsal_tools.c.
void GPFSFSAL_get_stats | ( | fsal_statistics_t * | stats, |
fsal_boolean_t | reset | ||
) |
FSAL_get_stats: Retrieve call statistics for current thread.
stats | (output): Pointer to the call statistics structure. |
reset | (input): Boolean that indicates if the stats must be reset. |
Definition at line 33 of file FSAL_GPFS/fsal_stats.c.
fsal_status_t GPFSFSAL_getattrs | ( | fsal_handle_t * | p_filehandle, |
fsal_op_context_t * | p_context, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
GPFSFSAL_getattrs: Get attributes for the object specified by its filehandle.
filehandle | (input): The handle of the object to get parameters. |
cred | (input): Authentication context for the operation (user,...). |
object_attributes | (mandatory input/output): The retrieved attributes for the 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). |
Definition at line 70 of file FSAL_GPFS/fsal_attrs.c.
fsal_status_t GPFSFSAL_getattrs_descriptor | ( | fsal_file_t * | p_file_descriptor, |
fsal_handle_t * | p_filehandle, | ||
fsal_op_context_t * | p_context, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
GPFSFSAL_getattrs_descriptor: Get attributes for the object specified by its descriptor or by it's filehandle.
p_file_descriptor | (input): The file descriptor of the object to get parameters. |
p_filehandle | (input): The handle of the object to get parameters. |
p_context | (input): Authentication context for the operation (user,...). |
p_object_attributes | (mandatory input/output): The retrieved attributes for the 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). |
Definition at line 147 of file FSAL_GPFS/fsal_attrs.c.
unsigned int GPFSFSAL_GetFileno | ( | fsal_file_t * | pfile | ) |
Definition at line 497 of file FSAL_GPFS/fsal_fileop.c.
char* GPFSFSAL_GetFSName | ( | ) |
Definition at line 47 of file FSAL_GPFS/fsal_tools.c.
fsal_status_t GPFSFSAL_GetXAttrAttrs | ( | fsal_handle_t * | p_objecthandle, |
fsal_op_context_t * | p_context, | ||
unsigned int | xattr_id, | ||
fsal_attrib_list_t * | p_attrs | ||
) |
Get the attributes of an extended attribute from its index.
p_objecthandle | Handle of the object you want to get attribute for. |
p_context | pointer to the current security context. |
xattr_cookie | xattr's cookie (as returned by listxattrs). |
p_attrs | xattr's attributes. |
p_attrs | IN/OUT xattr attributes (if supported) |
Definition at line 257 of file FSAL_GPFS/fsal_xattrs.c.
fsal_status_t GPFSFSAL_GetXAttrIdByName | ( | fsal_handle_t * | p_objecthandle, |
const fsal_name_t * | xattr_name, | ||
fsal_op_context_t * | p_context, | ||
unsigned int * | pxattr_id | ||
) |
Get the index of an xattr based on its name
p_objecthandle | Handle of the object you want to get attribute for. |
xattr_name | the name of the attribute to be read. |
pxattr_id | found xattr_id |
Definition at line 446 of file FSAL_GPFS/fsal_xattrs.c.
int GPFSFSAL_GetXattrOffsetSetable | ( | void | ) |
fsal_status_t GPFSFSAL_GetXAttrValueById | ( | fsal_handle_t * | p_objecthandle, |
unsigned int | xattr_id, | ||
fsal_op_context_t * | p_context, | ||
caddr_t | buffer_addr, | ||
size_t | buffer_size, | ||
size_t * | p_output_size | ||
) |
Get the value of an extended attribute from its index.
p_objecthandle | Handle of the object you want to get attribute for. |
xattr_name | the name of the attribute to be read. |
p_context | pointer to the current security context. |
buffer_addr | address of the buffer where the xattr value is to be stored. |
buffer_size | size of the buffer where the xattr value is to be stored. |
p_output_size | size of the data actually stored into the buffer. |
Definition at line 408 of file FSAL_GPFS/fsal_xattrs.c.
fsal_status_t GPFSFSAL_GetXAttrValueByName | ( | fsal_handle_t * | p_objecthandle, |
const fsal_name_t * | xattr_name, | ||
fsal_op_context_t * | p_context, | ||
caddr_t | buffer_addr, | ||
size_t | buffer_size, | ||
size_t * | p_output_size | ||
) |
Get the value of an extended attribute from its name.
p_objecthandle | Handle of the object you want to get attribute for. |
xattr_name | the name of the attribute to be read. |
p_context | pointer to the current security context. |
buffer_addr | address of the buffer where the xattr value is to be stored. |
buffer_size | size of the buffer where the xattr value is to be stored. |
p_output_size | size of the data actually stored into the buffer. |
Definition at line 492 of file FSAL_GPFS/fsal_xattrs.c.
unsigned int GPFSFSAL_Handle_to_HashIndex | ( | fsal_handle_t * | handle, |
unsigned int | cookie, | ||
unsigned int | alphabet_len, | ||
unsigned int | index_size | ||
) |
FSAL_Handle_to_HashIndex This function is used for hashing a FSAL handle in order to dispatch entries into the hash table array.
p_handle | The handle to be hashed |
cookie | Makes it possible to have different hash value for the same handle, when cookie changes. |
alphabet_len | Parameter for polynomial hashing algorithm |
index_size | The range of hash value will be [0..index_size-1] |
Definition at line 107 of file FSAL_GPFS/fsal_tools.c.
unsigned int GPFSFSAL_Handle_to_RBTIndex | ( | fsal_handle_t * | p_handle, |
unsigned int | cookie | ||
) |
Definition at line 158 of file FSAL_GPFS/fsal_tools.c.
int GPFSFSAL_handlecmp | ( | fsal_handle_t * | handle_1, |
fsal_handle_t * | handle_2, | ||
fsal_status_t * | status | ||
) |
FSAL_handlecmp: Compare 2 handles.
handle1 | (input): The first handle to be compared. |
handle2 | (input): The second handle to be compared. |
status | (output): The status of the compare operation. |
Definition at line 68 of file FSAL_GPFS/fsal_tools.c.
fsal_status_t GPFSFSAL_Init | ( | fsal_parameter_t * | init_info | ) |
FSAL_Init : Initializes the FileSystem Abstraction Layer.
init_info | (input, fsal_parameter_t *) : Pointer to a structure that contains all initialization parameters for the FSAL. Specifically, it contains settings about the filesystem on which the FSAL is based, security settings, logging policy and outputs, and other general FSAL options. |
Definition at line 66 of file FSAL_GPFS/fsal_init.c.
fsal_status_t GPFSFSAL_link | ( | fsal_handle_t * | p_target_handle, |
fsal_handle_t * | p_dir_handle, | ||
fsal_name_t * | p_link_name, | ||
fsal_op_context_t * | p_context, | ||
fsal_attrib_list_t * | p_attributes | ||
) |
FSAL_link: Create a hardlink.
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. |
Definition at line 281 of file FSAL_GPFS/fsal_create.c.
fsal_status_t GPFSFSAL_ListXAttrs | ( | fsal_handle_t * | p_objecthandle, |
unsigned int | cookie, | ||
fsal_op_context_t * | p_context, | ||
fsal_xattrent_t * | xattrs_tab, | ||
unsigned int | xattrs_tabsize, | ||
unsigned int * | p_nb_returned, | ||
int * | end_of_list | ||
) |
Retrieves the list of extended attributes for an object in the filesystem.
p_objecthandle | Handle of the object we want to get extended attributes. |
cookie | index of the next entry to be returned. |
p_context | pointer to the current security context. |
xattrs_tab | a table for storing extended attributes list to. |
xattrs_tabsize | the maximum number of xattr entries that xattrs_tab can contain. |
p_nb_returned | the number of xattr entries actually stored in xattrs_tab. |
end_of_list | this boolean indicates that the end of xattrs list has been reached. |
Definition at line 322 of file FSAL_GPFS/fsal_xattrs.c.
fsal_status_t GPFSFSAL_load_FS_specific_parameter_from_conf | ( | config_file_t | in_config, |
fsal_parameter_t * | out_parameter | ||
) |
FSAL_load_FSAL_parameter_from_conf, FSAL_load_FS_common_parameter_from_conf, FSAL_load_FS_specific_parameter_from_conf:
Those functions initialize the FSAL init parameter structure from a configuration structure.
in_config | (input): Structure that represents the parsed configuration file. |
out_parameter | (ouput) FSAL initialization structure filled according to the configuration file given as parameter. |
Definition at line 394 of file FSAL_GPFS/fsal_tools.c.
fsal_status_t GPFSFSAL_lock_op | ( | fsal_file_t * | p_file_descriptor, |
fsal_handle_t * | p_filehandle, | ||
fsal_op_context_t * | p_context, | ||
void * | p_owner, | ||
fsal_lock_op_t | lock_op, | ||
fsal_lock_param_t | request_lock, | ||
fsal_lock_param_t * | conflicting_lock | ||
) |
GPFSFSAL_lock_op: Lock/unlock/test an owner independent (anonymous) lock for a region in a file.
p_file_descriptor | (input): File descriptor of the file to lock. |
p_filehandle | (input): File handle of the file to lock. |
p_context | (input): Context |
p_owner | (input): Owner for the requested lock; Opaque to FSAL. |
lock_op | (input): Can be either FSAL_OP_LOCKT, FSAL_OP_LOCK, FSAL_OP_UNLOCK. The operations are test if a file region is locked, lock a file region, unlock a file region. |
lock_type | (input): Can be either FSAL_LOCK_R, FSAL_LOCK_W. Either a read lock or write lock. |
lock_start | (input): Start of lock region measured as offset of bytes from start of file. |
lock_length | (input): Number of bytes to lock. |
Definition at line 62 of file FSAL_GPFS/fsal_lock.c.
fsal_status_t GPFSFSAL_lookup | ( | fsal_handle_t * | p_parent_directory_handle, |
fsal_name_t * | p_filename, | ||
fsal_op_context_t * | p_context, | ||
fsal_handle_t * | object_handle, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
FSAL_lookup : Looks up for an object into a directory.
Note : if parent handle and filename are NULL, this retrieves root's handle.
parent_directory_handle | (input) Handle of the parent directory to search the object in. |
filename | (input) The name of the object to find. |
p_context | (input) Authentication context for the operation (user,...). |
object_handle | (output) The handle of the object corresponding to filename. |
object_attributes | (optional input/output) Pointer to the attributes of the object we found. 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). It can be NULL (increases performances). |
Definition at line 70 of file FSAL_GPFS/fsal_lookup.c.
fsal_status_t GPFSFSAL_lookupJunction | ( | fsal_handle_t * | p_junction_handle, |
fsal_op_context_t * | p_context, | ||
fsal_handle_t * | p_fsoot_handle, | ||
fsal_attrib_list_t * | p_fsroot_attributes | ||
) |
FSAL_lookupJunction : Get the fileset root for a junction.
p_junction_handle | (input) Handle of the junction to be looked up. |
p_context | (input) Authentication context for the operation (user,...). |
p_fsroot_handle | (output) The handle of root directory of the fileset. |
p_fsroot_attributes | (optional input/output) Pointer to the attributes of the root directory for the fileset. 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). It can be NULL (increases performances). |
Definition at line 294 of file FSAL_GPFS/fsal_lookup.c.
fsal_status_t GPFSFSAL_lookupPath | ( | fsal_path_t * | p_path, |
fsal_op_context_t * | p_context, | ||
fsal_handle_t * | object_handle, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
FSAL_lookupPath : Looks up for an object into the namespace.
Note : if path equals "/", this retrieves root's handle.
path | (input) The path of the object to find. |
p_context | (input) Authentication context for the operation (user,...). |
object_handle | (output) The handle of the object corresponding to filename. |
object_attributes | (optional input/output) Pointer to the attributes of the object we found. 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). It can be NULL (increases performances). |
Definition at line 230 of file FSAL_GPFS/fsal_lookup.c.
fsal_status_t GPFSFSAL_mkdir | ( | fsal_handle_t * | p_parent_directory_handle, |
fsal_name_t * | p_dirname, | ||
fsal_op_context_t * | p_context, | ||
fsal_accessmode_t | accessmode, | ||
fsal_handle_t * | p_object_handle, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
FSAL_mkdir: Create a directory.
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. |
Definition at line 165 of file FSAL_GPFS/fsal_create.c.
fsal_status_t GPFSFSAL_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 upon HPSS.
Definition at line 363 of file FSAL_GPFS/fsal_create.c.
fsal_status_t GPFSFSAL_open | ( | fsal_handle_t * | p_filehandle, |
fsal_op_context_t * | p_context, | ||
fsal_openflags_t | openflags, | ||
fsal_file_t * | file_desc, | ||
fsal_attrib_list_t * | p_file_attributes | ||
) |
FSAL_open: Open a regular file for reading/writing its data content.
filehandle | (input): Handle of the file to be read/modified. |
cred | (input): Authentication context for the operation (user,...). |
openflags | (input): Flags that indicates behavior for file opening and access. This is an inclusive OR of the following values ( such of them are not compatible) :
|
file_descriptor | (output): The file descriptor to be used for FSAL_read/write operations. |
file_attributes | (optionnal input/output): Post operation attributes. 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). |
Definition at line 132 of file FSAL_GPFS/fsal_fileop.c.
fsal_status_t GPFSFSAL_open_by_name | ( | fsal_handle_t * | dirhandle, |
fsal_name_t * | filename, | ||
fsal_op_context_t * | p_context, | ||
fsal_openflags_t | openflags, | ||
fsal_file_t * | file_descriptor, | ||
fsal_attrib_list_t * | file_attributes | ||
) |
FSAL_open_byname: Open a regular file for reading/writing its data content.
dirhandle | (input): Handle of the directory that contain the file to be read/modified. |
filename | (input): Name of the file to be read/modified |
cred | (input): Authentication context for the operation (user,...). |
openflags | (input): Flags that indicates behavior for file opening and access. This is an inclusive OR of the following values ( such of them are not compatible) :
|
file_descriptor | (output): The file descriptor to be used for FSAL_read/write operations. |
file_attributes | (optionnal input/output): Post operation attributes. 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). |
Definition at line 82 of file FSAL_GPFS/fsal_fileop.c.
fsal_status_t GPFSFSAL_opendir | ( | fsal_handle_t * | p_dir_handle, |
fsal_op_context_t * | p_context, | ||
fsal_dir_t * | dir_desc, | ||
fsal_attrib_list_t * | p_dir_attributes | ||
) |
FSAL_opendir : Opens a directory for reading its content.
dir_handle | (input) the handle of the directory to be opened. |
cred | (input) Permission context for the operation (user,...). |
dir_descriptor | (output) pointer to an allocated structure that will receive directory stream informations, on successfull completion. |
dir_attributes | (optional output) On successfull completion,the structure pointed by dir_attributes receives the new directory attributes. May be NULL. |
Definition at line 43 of file FSAL_GPFS/fsal_dirs.c.
fsal_status_t GPFSFSAL_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 GPFS file to/from a local filesystem.
filehandle | (input): Handle of the GPFS file to be copied. |
cred | (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 :
|
Definition at line 52 of file FSAL_GPFS/fsal_rcp.c.
fsal_status_t GPFSFSAL_read | ( | fsal_file_t * | file_desc, |
fsal_seek_t * | p_seek_descriptor, | ||
fsal_size_t | buffer_size, | ||
caddr_t | buffer, | ||
fsal_size_t * | p_read_amount, | ||
fsal_boolean_t * | p_end_of_file | ||
) |
FSAL_read: Perform a read operation on an opened file.
file_descriptor | (input): The file descriptor returned by FSAL_open. |
seek_descriptor | (optional input): Specifies the position where data is to be read. If not specified, data will be read at the current position. |
buffer_size | (input): Amount (in bytes) of data to be read. |
buffer | (output): Address where the read data is to be stored in memory. |
read_amount | (output): Pointer to the amount of data (in bytes) that have been read during this call. |
end_of_file | (output): Pointer to a boolean that indicates whether the end of file has been reached during this call. |
Definition at line 219 of file FSAL_GPFS/fsal_fileop.c.
fsal_status_t GPFSFSAL_readdir | ( | fsal_dir_t * | p_dir_descriptor, |
fsal_cookie_t | start_position, | ||
fsal_attrib_mask_t | get_attr_mask, | ||
fsal_mdsize_t | buffersize, | ||
fsal_dirent_t * | p_pdirent, | ||
fsal_cookie_t * | p_end_position, | ||
fsal_count_t * | p_nb_entries, | ||
fsal_boolean_t * | p_end_of_dir | ||
) |
Definition at line 153 of file FSAL_GPFS/fsal_dirs.c.
fsal_status_t GPFSFSAL_readlink | ( | fsal_handle_t * | p_linkhandle, |
fsal_op_context_t * | p_context, | ||
fsal_path_t * | p_link_content, | ||
fsal_attrib_list_t * | p_link_attributes | ||
) |
FSAL_readlink: Read the content of a symbolic link.
linkhandle | (input): Handle of the link to be read. |
cred | (input): Authentication context for the operation (user,...). |
p_link_content | (output): Pointer to an fsal path structure where the link content is to be stored.. |
link_attributes | (optionnal input/output): The post operation attributes of the symlink link. 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. |
Definition at line 67 of file FSAL_GPFS/fsal_symlinks.c.
fsal_status_t GPFSFSAL_RemoveXAttrById | ( | fsal_handle_t * | p_objecthandle, |
fsal_op_context_t * | p_context, | ||
unsigned int | xattr_id | ||
) |
Removes a xattr by Name
p_objecthandle | Handle of the object you want to get attribute for. |
p_context | pointer to the current security context. |
xattr_name | xattr's name |
Definition at line 555 of file FSAL_GPFS/fsal_xattrs.c.
fsal_status_t GPFSFSAL_RemoveXAttrByName | ( | fsal_handle_t * | p_objecthandle, |
fsal_op_context_t * | p_context, | ||
const fsal_name_t * | xattr_name | ||
) |
Removes a xattr by Name
p_objecthandle | Handle of the object you want to get attribute for. |
p_context | pointer to the current security context. |
xattr_name | xattr's name |
Definition at line 570 of file FSAL_GPFS/fsal_xattrs.c.
fsal_status_t GPFSFSAL_rename | ( | fsal_handle_t * | p_old_parentdir_handle, |
fsal_name_t * | p_old_name, | ||
fsal_handle_t * | p_new_parentdir_handle, | ||
fsal_name_t * | p_new_name, | ||
fsal_op_context_t * | p_context, | ||
fsal_attrib_list_t * | p_src_dir_attributes, | ||
fsal_attrib_list_t * | p_tgt_dir_attributes | ||
) |
FSAL_rename: Change name and/or parent dir of a filesystem object.
old_parentdir_handle | (input): Source parent directory of the object is to be moved/renamed. |
p_old_name | (input): Pointer to the current name of the object to be moved/renamed. |
new_parentdir_handle | (input): Target parent directory for the object. |
p_new_name | (input): Pointer to the new name for the object. |
cred | (input): Authentication context for the operation (user,...). |
src_dir_attributes | (optionnal input/output): Post operation attributes for the source 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. |
tgt_dir_attributes | (optionnal input/output): Post operation attributes for the target 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. |
Definition at line 77 of file FSAL_GPFS/fsal_rename.c.
fsal_status_t GPFSFSAL_setattrs | ( | fsal_handle_t * | p_filehandle, |
fsal_op_context_t * | p_context, | ||
fsal_attrib_list_t * | p_attrib_set, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
GPFSFSAL_setattrs: Set attributes for the object specified by its filehandle.
filehandle | (input): The handle of the object to get parameters. |
cred | (input): Authentication context for the operation (user,...). |
attrib_set | (mandatory input): The attributes to be set for the object. It defines the attributes that the caller wants to set and their values. |
object_attributes | (optionnal input/output): The post operation attributes for the 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. |
Definition at line 180 of file FSAL_GPFS/fsal_attrs.c.
fsal_status_t GPFSFSAL_SetDefault_FS_specific_parameter | ( | fsal_parameter_t * | out_parameter | ) |
Those routines set the default parameters for FSAL init structure.
Definition at line 340 of file FSAL_GPFS/fsal_tools.c.
fsal_status_t GPFSFSAL_SetXAttrValue | ( | fsal_handle_t * | p_objecthandle, |
const fsal_name_t * | xattr_name, | ||
fsal_op_context_t * | p_context, | ||
caddr_t | buffer_addr, | ||
size_t | buffer_size, | ||
int | create | ||
) |
Definition at line 527 of file FSAL_GPFS/fsal_xattrs.c.
fsal_status_t GPFSFSAL_SetXAttrValueById | ( | fsal_handle_t * | p_objecthandle, |
unsigned int | xattr_id, | ||
fsal_op_context_t * | p_context, | ||
caddr_t | buffer_addr, | ||
size_t | buffer_size | ||
) |
Definition at line 538 of file FSAL_GPFS/fsal_xattrs.c.
fsal_status_t GPFSFSAL_share_op | ( | fsal_file_t * | p_file_descriptor, |
fsal_handle_t * | p_filehandle, | ||
fsal_op_context_t * | p_context, | ||
void * | p_owner, | ||
fsal_share_param_t | request_share | ||
) |
GPFSFSAL_share_op:
Definition at line 36 of file fsal_share.c.
fsal_status_t GPFSFSAL_symlink | ( | fsal_handle_t * | p_parent_directory_handle, |
fsal_name_t * | p_linkname, | ||
fsal_path_t * | p_linkcontent, | ||
fsal_op_context_t * | p_context, | ||
fsal_accessmode_t | accessmode, | ||
fsal_handle_t * | p_link_handle, | ||
fsal_attrib_list_t * | p_link_attributes | ||
) |
FSAL_symlink: Create a symbolic link.
parent_directory_handle | (input): Handle of the parent directory where the link is to be created. |
p_linkname | (input): Name of the link to be created. |
p_linkcontent | (input): Content of the link to be created. |
cred | (input): Authentication context for the operation (user,...). |
accessmode | (ignored input): Mode of the link to be created. It has no sense in HPSS nor UNIX filesystems. |
link_handle | (output): Pointer to the handle of the created symlink. |
link_attributes | (optionnal input/output): Attributes of the newly created symlink. 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. |
Definition at line 151 of file FSAL_GPFS/fsal_symlinks.c.
fsal_status_t GPFSFSAL_test_access | ( | fsal_op_context_t * | p_context, |
fsal_accessflags_t | access_type, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
FSAL_test_access : Tests whether the user or entity identified by its cred can access the object as indicated by the access_type parameter. This function tests access rights using cached attributes given as parameter. Thus, it cannot test FSAL_F_OK flag, and asking such a flag will result in a ERR_FSAL_INVAL error.
cred | (input): Authentication context for the operation (user,...). |
access_type | (input): Indicates the permissions to test. This is an inclusive OR of the permissions to be checked for the user identified by cred. Permissions constants are :
|
object_attributes | (mandatory input): The cached attributes for the object to test rights on. The following attributes MUST be filled : owner, group, mode, ACLs. |
Definition at line 75 of file FSAL_GPFS/fsal_local_op.c.
fsal_status_t GPFSFSAL_truncate | ( | fsal_handle_t * | p_filehandle, |
fsal_op_context_t * | p_context, | ||
fsal_size_t | length, | ||
fsal_file_t * | file_descriptor, | ||
fsal_attrib_list_t * | p_object_attributes | ||
) |
FSAL_truncate: Modify the data length of a regular file.
filehandle | (input): Handle of the file is to be truncated. |
cred | (input): Authentication context for the operation (user,...). |
length | (input): The new data length for the file. |
object_attributes | (optionnal input/output): The post operation attributes of the 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). May be NULL. |
Definition at line 70 of file FSAL_GPFS/fsal_truncate.c.
fsal_status_t GPFSFSAL_unlink | ( | fsal_handle_t * | p_parent_directory_handle, |
fsal_name_t * | p_object_name, | ||
fsal_op_context_t * | p_context, | ||
fsal_attrib_list_t * | p_parent_directory_attributes | ||
) |
FSAL_unlink: Remove a filesystem object .
parentdir_handle | (input): Handle of the parent directory of the object to be deleted. |
p_object_name | (input): Name of the object to be removed. |
cred | (input): Authentication context for the operation (user,...). |
parentdir_attributes | (optionnal input/output): Post operation attributes of the parent 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. |
Definition at line 70 of file FSAL_GPFS/fsal_unlink.c.
fsal_status_t GPFSFSAL_write | ( | fsal_file_t * | file_desc, |
fsal_op_context_t * | p_context, | ||
fsal_seek_t * | p_seek_descriptor, | ||
fsal_size_t | buffer_size, | ||
caddr_t | buffer, | ||
fsal_size_t * | p_write_amount | ||
) |
FSAL_write: Perform a write operation on an opened file.
file_descriptor | (input): The file descriptor returned by FSAL_open. |
p_context | (input): Authentication context for the operation (user,...). |
seek_descriptor | (optional input): Specifies the position where data is to be written. If not specified, data will be written at the current position. |
buffer_size | (input): Amount (in bytes) of data to be written. |
buffer | (input): Address in memory of the data to write to file. |
write_amount | (output): Pointer to the amount of data (in bytes) that have been written during this call. |
Definition at line 335 of file FSAL_GPFS/fsal_fileop.c.
void ReleaseTokenFSCall | ( | ) |
Definition at line 269 of file FSAL_CEPH/fsal_internal.c.
void TakeTokenFSCall | ( | ) |
Used to limit the number of simultaneous calls to Filesystem.
Definition at line 258 of file FSAL_CEPH/fsal_internal.c.
Definition at line 52 of file FSAL_CEPH/fsal_internal.c.