CERN org.glite.Gfal
2.0.1
|
file for the lfc plugin module More...
#include <regex.h>
#include <pthread.h>
#include <errno.h>
#include <sys/types.h>
#include <dirent.h>
#include <attr/xattr.h>
#include <common/gfal_prototypes.h>
#include <common/gfal_types.h>
#include <common/gfal_common_plugin.h>
#include "gfal_common_lfc.h"
#include "gfal_common_lfc_open.h"
#include "../gfal_common_internal.h"
#include "../gfal_common_errverbose.h"
#include "../gfal_common_filedescriptor.h"
#include "lfc_ifce_ng.h"
Data Structures | |
struct | _lfc_opendir_handle |
Typedefs | |
typedef struct _lfc_opendir_handle * | lfc_opendir_handle |
Functions | |
const char * | lfc_getName () |
int | lfc_chmodG (plugin_handle handle, const char *path, mode_t mode, GError **err) |
int | lfc_accessG (plugin_handle handle, const char *lfn, int mode, GError **err) |
int | lfc_renameG (plugin_handle handle, const char *oldpath, const char *newpath, GError **err) |
int | lfc_symlinkG (plugin_handle handle, const char *oldpath, const char *newpath, GError **err) |
int | lfc_statG (plugin_handle handle, const char *path, struct stat *st, GError **err) |
char ** | lfc_getSURLG (plugin_handle handle, const char *path, GError **err) |
ssize_t | lfc_getxattr_getsurl (plugin_handle handle, const char *path, void *buff, size_t size, GError **err) |
ssize_t | lfc_getxattr_getguid (plugin_handle handle, const char *path, void *buff, size_t size, GError **err) |
ssize_t | lfc_getxattr_comment (plugin_handle handle, const char *path, void *buff, size_t size, GError **err) |
ssize_t | lfc_getxattrG (plugin_handle handle, const char *path, const char *name, void *buff, size_t size, GError **err) |
ssize_t | lfc_listxattrG (plugin_handle handle, const char *path, char *list, size_t size, GError **err) |
int | lfc_setxattr_comment (plugin_handle handle, const char *path, const char *name, const void *value, size_t size, int flags, GError **err) |
int | lfc_setxattrG (plugin_handle handle, const char *path, const char *name, const void *value, size_t size, int flags, GError **err) |
char * | lfc_resolve_guid (plugin_handle handle, const char *guid, GError **err) |
int | lfc_is_used_parameter (plugin_handle handle, const char *namespace, const char *key) |
void | lfc_notify_change_parameter (plugin_handle handle, const char *namespace, const char *key) |
gfal_plugin_interface | gfal_plugin_init (gfal_handle handle, GError **err) |
gboolean | gfal_checker_guid (const char *guid, GError **err) |
gboolean | gfal_lfc_check_lfn_url (plugin_handle handle, const char *url, plugin_mode mode, GError **err) |
Variables | |
pthread_mutex_t | m_lfcinit = PTHREAD_MUTEX_INITIALIZER |
file for the lfc plugin module
gboolean gfal_checker_guid | ( | const char * | guid, |
GError ** | err | ||
) |
parse a guid to check the validity
Referenced by gfal_lfc_check_lfn_url().
gboolean gfal_lfc_check_lfn_url | ( | plugin_handle | handle, |
const char * | url, | ||
plugin_mode | mode, | ||
GError ** | err | ||
) |
Check if the passed url and operation is compatible with lfc
References gfal_checker_guid().
Referenced by gfal_plugin_init().
gfal_plugin_interface gfal_plugin_init | ( | gfal_handle | handle, |
GError ** | err | ||
) |
Map function for the lfc interface this function provide the generic PLUGIN interface for the LFC plugin. lfc_initG do : liblfc shared library load, sym resolve, endpoint check, and plugin function map.
References _gfal_plugin_interface::accessG, _gfal_plugin_interface::check_plugin_url, _gfal_plugin_interface::chmodG, _gfal_plugin_interface::getxattrG, gfal_lfc_check_lfn_url(), gfal_lfc_init_thread(), gfal_load_lfc(), gfal_print_verbose(), gfal_setup_lfchost(), _gfal_plugin_interface::is_used_parameter, lfc_accessG(), lfc_chmodG(), lfc_getName(), lfc_getxattrG(), lfc_is_used_parameter(), lfc_listxattrG(), lfc_notify_change_parameter(), lfc_openG(), lfc_renameG(), lfc_setxattrG(), lfc_statG(), lfc_symlinkG(), _gfal_plugin_interface::listxattrG, _gfal_plugin_interface::notify_change_parameter, _gfal_plugin_interface::plugin_delete, _gfal_plugin_interface::setxattrG, and _gfal_plugin_interface::unlinkG.
int lfc_accessG | ( | plugin_handle | handle, |
const char * | lfn, | ||
int | mode, | ||
GError ** | err | ||
) |
implementation of the access call with the lfc plugin return 0 or -1 if error and report GError** with error code and message
References gfal_lfc_init_thread().
Referenced by gfal_plugin_init().
int lfc_chmodG | ( | plugin_handle | handle, |
const char * | path, | ||
mode_t | mode, | ||
GError ** | err | ||
) |
Implementation of the chmod function with the LFC plugin return 0 or the errno if error, or set GError if serious error
References gfal_lfc_init_thread().
Referenced by gfal_plugin_init().
const char* lfc_getName | ( | ) |
just return the name of the layer
Referenced by gfal_plugin_init().
char** lfc_getSURLG | ( | plugin_handle | handle, |
const char * | path, | ||
GError ** | err | ||
) |
resolve the lfc link to the surls
References gfal_lfc_getSURL(), and gfal_lfc_init_thread().
Referenced by lfc_getxattr_getsurl(), and lfc_openG().
ssize_t lfc_getxattr_comment | ( | plugin_handle | handle, |
const char * | path, | ||
void * | buff, | ||
size_t | size, | ||
GError ** | err | ||
) |
lfc getxattr for path -> comment resolution
Referenced by lfc_getxattrG().
ssize_t lfc_getxattr_getguid | ( | plugin_handle | handle, |
const char * | path, | ||
void * | buff, | ||
size_t | size, | ||
GError ** | err | ||
) |
lfc getxattr for the path -> guid resolution
Referenced by lfc_getxattrG().
ssize_t lfc_getxattr_getsurl | ( | plugin_handle | handle, |
const char * | path, | ||
void * | buff, | ||
size_t | size, | ||
GError ** | err | ||
) |
lfc getxattr for the path -> surls resolution
References lfc_getSURLG().
Referenced by lfc_getxattrG().
ssize_t lfc_getxattrG | ( | plugin_handle | handle, |
const char * | path, | ||
const char * | name, | ||
void * | buff, | ||
size_t | size, | ||
GError ** | err | ||
) |
lfc getxattr implem
References gfal_lfc_init_thread(), lfc_getxattr_comment(), lfc_getxattr_getguid(), and lfc_getxattr_getsurl().
Referenced by gfal_plugin_init().
int lfc_is_used_parameter | ( | plugin_handle | handle, |
const char * | namespace, | ||
const char * | key | ||
) |
ssize_t lfc_listxattrG | ( | plugin_handle | handle, |
const char * | path, | ||
char * | list, | ||
size_t | size, | ||
GError ** | err | ||
) |
lfc getxattr implem
Referenced by gfal_plugin_init().
void lfc_notify_change_parameter | ( | plugin_handle | handle, |
const char * | namespace, | ||
const char * | key | ||
) |
Receive notification of a change in the parameter, take care of it
References gfal_common_parameter_get_string(), and gfal_print_verbose().
Referenced by gfal_plugin_init().
int lfc_renameG | ( | plugin_handle | handle, |
const char * | oldpath, | ||
const char * | newpath, | ||
GError ** | err | ||
) |
Implementation of the rename call for the lfc plugin return 0 if success else -1 if error and set GError
References gfal_lfc_init_thread().
Referenced by gfal_plugin_init().
char* lfc_resolve_guid | ( | plugin_handle | handle, |
const char * | guid, | ||
GError ** | err | ||
) |
Convert a guid to a plugin url if possible return the link in a plugin's url string or err and NULL if not found
References gfal_convert_guid_to_lfn().
int lfc_setxattr_comment | ( | plugin_handle | handle, |
const char * | path, | ||
const char * | name, | ||
const void * | value, | ||
size_t | size, | ||
int | flags, | ||
GError ** | err | ||
) |
setxattr function special for comments
Referenced by lfc_setxattrG().
int lfc_setxattrG | ( | plugin_handle | handle, |
const char * | path, | ||
const char * | name, | ||
const void * | value, | ||
size_t | size, | ||
int | flags, | ||
GError ** | err | ||
) |
int lfc_statG | ( | plugin_handle | handle, |
const char * | path, | ||
struct stat * | st, | ||
GError ** | err | ||
) |
execute a posix stat request on the lfc return 0 and set struct if correct answer, else return negative value and set GError
References gfal_lfc_init_thread().
Referenced by gfal_plugin_init().
int lfc_symlinkG | ( | plugin_handle | handle, |
const char * | oldpath, | ||
const char * | newpath, | ||
GError ** | err | ||
) |
Implementation of the symlinkG call for the lfc plugin return 0 if success else -1 if error and set GError
References gfal_lfc_init_thread().
Referenced by gfal_plugin_init().