|
XRootD
|
#include <cstring>#include <sys/types.h>#include <iostream>#include <libgen.h>#include <unistd.h>#include <pwd.h>#include <grp.h>#include <ctime>#include <pthread.h>#include <cstdio>#include <syslog.h>#include "XrdNet/XrdNetAddr.hh"#include "XrdNet/XrdNetUtils.hh"#include "XrdOuc/XrdOucECMsg.hh"#include "XrdPosix/XrdPosixAdmin.hh"#include "XrdSec/XrdSecEntity.hh"#include "XrdSecsss/XrdSecsssID.hh"#include "XrdFfs/XrdFfsDent.hh"#include "XrdFfs/XrdFfsFsinfo.hh"#include "XrdFfs/XrdFfsMisc.hh"#include "XrdFfs/XrdFfsPosix.hh"#include "XrdFfs/XrdFfsQueue.hh"#include "XrdPosix/XrdPosixConfig.hh"
Include dependency graph for XrdFfsMisc.cc:Go to the source code of this file.
Macros | |
| #define | _FILE_OFFSET_BITS 64 |
| #define | MAXROOTURLLEN 1024 |
| #define | nXrdConnPerUsr 8; |
Functions | |
| void | decTo24 (unsigned int d, char *d24) |
| char * | ntoa24 (unsigned int d) |
| void | toChar (unsigned int r, char *d24) |
| int | XrdFfsMisc_get_all_urls (const char *oldurl, char **newurls, const int nnodes) |
| int | XrdFfsMisc_get_all_urls_real (const char *oldurl, char **newurls, const int nnodes) |
| char | XrdFfsMisc_get_current_url (const char *oldurl, char *newurl) |
| int | XrdFfsMisc_get_list_of_data_servers (char *list) |
| int | XrdFfsMisc_get_number_of_data_servers () |
| char * | XrdFfsMisc_getNameByAddr (char *ipaddr) |
| void | XrdFfsMisc_logging_url_cache (const char *url) |
| void | XrdFfsMisc_refresh_url_cache (const char *url) |
| void | XrdFfsMisc_set_Urlcachelife (const char *urlcachelife) |
| void | XrdFfsMisc_xrd_init (const char *rdrurl, const char *urlcachelife, int startQueue) |
| void | XrdFfsMisc_xrd_secsss_editurl (char *url, uid_t user_uid, int *id) |
| void | XrdFfsMisc_xrd_secsss_init () |
| void | XrdFfsMisc_xrd_secsss_register (uid_t user_uid, gid_t user_gid, int *id) |
Variables | |
| short | iXrdConnPerUsr = 0 |
| pthread_mutex_t | url_mlock |
| char | XrdFfsMiscCururl [MAXROOTURLLEN] = "" |
| int | XrdFfsMiscNcachedurls = 0 |
| bool | XrdFfsMiscSecsss = false |
| XrdSecsssID * | XrdFfsMiscSssid |
| char * | XrdFfsMiscUrlcache [XrdFfs_MAX_NUM_NODES] |
| pthread_mutex_t | XrdFfsMiscUrlcache_mutex = PTHREAD_MUTEX_INITIALIZER |
| time_t | XrdFfsMiscUrlcachelife = 60 |
| time_t | XrdFfsMiscUrlcachetime = 0 |
| #define _FILE_OFFSET_BITS 64 |
Definition at line 30 of file XrdFfsMisc.cc.
| #define MAXROOTURLLEN 1024 |
Definition at line 62 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_get_all_urls(), XrdFfsMisc_get_all_urls_real(), XrdFfsMisc_get_list_of_data_servers(), XrdFfsMisc_xrd_secsss_editurl(), XrdFfsPosix_deleteall(), XrdFfsPosix_readdirall(), XrdFfsPosix_renameall(), XrdFfsPosix_statall(), XrdFfsPosix_statvfsall(), and XrdFfsPosix_truncateall().
| #define nXrdConnPerUsr 8; |
Definition at line 64 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_xrd_secsss_register().
| void decTo24 | ( | unsigned int | d, |
| char * | d24 ) |
| char * ntoa24 | ( | unsigned int | d | ) |
Definition at line 359 of file XrdFfsMisc.cc.
References decTo24().
Referenced by XrdFfsMisc_xrd_secsss_editurl(), and XrdFfsMisc_xrd_secsss_register().
Here is the call graph for this function:
Here is the caller graph for this function:| void toChar | ( | unsigned int | r, |
| char * | d24 ) |
Definition at line 341 of file XrdFfsMisc.cc.
Referenced by decTo24().
Here is the caller graph for this function:| int XrdFfsMisc_get_all_urls | ( | const char * | oldurl, |
| char ** | newurls, | ||
| const int | nnodes ) |
Definition at line 172 of file XrdFfsMisc.cc.
References MAXROOTURLLEN, XrdFfs_MAX_NUM_NODES, XrdFfsMisc_get_all_urls_real(), XrdFfsMiscCururl, XrdFfsMiscNcachedurls, XrdFfsMiscUrlcache, XrdFfsMiscUrlcache_mutex, XrdFfsMiscUrlcachelife, and XrdFfsMiscUrlcachetime.
Referenced by XrdFfsMisc_refresh_url_cache(), XrdFfsPosix_deleteall(), XrdFfsPosix_readdirall(), XrdFfsPosix_renameall(), XrdFfsPosix_statall(), XrdFfsPosix_statvfsall(), and XrdFfsPosix_truncateall().
Here is the call graph for this function:
Here is the caller graph for this function:| int XrdFfsMisc_get_all_urls_real | ( | const char * | oldurl, |
| char ** | newurls, | ||
| const int | nnodes ) |
Definition at line 103 of file XrdFfsMisc.cc.
References XrdPosixAdmin::FanOut(), XrdPosixAdmin::isOK(), and MAXROOTURLLEN.
Referenced by XrdFfsMisc_get_all_urls().
Here is the call graph for this function:
Here is the caller graph for this function:| char XrdFfsMisc_get_current_url | ( | const char * | oldurl, |
| char * | newurl ) |
Definition at line 68 of file XrdFfsMisc.cc.
References XrdPosixAdmin::isOK(), XrdPosixAdmin::Stat(), stat, and XrdFfsPosix_stat().
Here is the call graph for this function:| int XrdFfsMisc_get_list_of_data_servers | ( | char * | list | ) |
Definition at line 209 of file XrdFfsMisc.cc.
References MAXROOTURLLEN, XrdNetAddrInfo::Name(), XrdNetUtils::Parse(), XrdNetAddr::Set(), XrdFfs_MAX_NUM_NODES, XrdFfsMiscNcachedurls, XrdFfsMiscUrlcache, and XrdFfsMiscUrlcache_mutex.
Referenced by XrdFfsMisc_logging_url_cache().
Here is the call graph for this function:
Here is the caller graph for this function:| int XrdFfsMisc_get_number_of_data_servers | ( | ) |
Definition at line 132 of file XrdFfsMisc.cc.
References XrdFfsMiscNcachedurls.
Referenced by XrdFfsPosix_statall().
Here is the caller graph for this function:| char * XrdFfsMisc_getNameByAddr | ( | char * | ipaddr | ) |
Definition at line 95 of file XrdFfsMisc.cc.
References XrdNetAddrInfo::Name(), and XrdNetAddr::Set().
Here is the call graph for this function:| void XrdFfsMisc_logging_url_cache | ( | const char * | url | ) |
Definition at line 273 of file XrdFfsMisc.cc.
References XrdFfs_MAX_NUM_NODES, XrdFfsMisc_get_list_of_data_servers(), and XrdFfsMisc_refresh_url_cache().
Referenced by XrdFfsMisc_xrd_init().
Here is the call graph for this function:
Here is the caller graph for this function:| void XrdFfsMisc_refresh_url_cache | ( | const char * | url | ) |
Definition at line 249 of file XrdFfsMisc.cc.
References XrdFfs_MAX_NUM_NODES, XrdFfsMisc_get_all_urls(), XrdFfsMiscCururl, XrdFfsMiscUrlcache_mutex, and XrdFfsMiscUrlcachetime.
Referenced by XrdFfsMisc_logging_url_cache(), and XrdFfsMisc_xrd_init().
Here is the call graph for this function:
Here is the caller graph for this function:| void XrdFfsMisc_set_Urlcachelife | ( | const char * | urlcachelife | ) |
Definition at line 137 of file XrdFfsMisc.cc.
References XrdFfsMiscUrlcachelife.
Referenced by XrdFfsMisc_xrd_init().
Here is the caller graph for this function:| void XrdFfsMisc_xrd_init | ( | const char * | rdrurl, |
| const char * | urlcachelife, | ||
| int | startQueue ) |
Definition at line 296 of file XrdFfsMisc.cc.
References XrdPosixConfig::SetEnv(), url_mlock, XrdFfsDent_cache_init(), XrdFfsMisc_logging_url_cache(), XrdFfsMisc_refresh_url_cache(), XrdFfsMisc_set_Urlcachelife(), XrdFfsMisc_xrd_secsss_init(), XrdFfsQueue_count_workers(), and XrdFfsQueue_create_workers().
Here is the call graph for this function:| void XrdFfsMisc_xrd_secsss_editurl | ( | char * | url, |
| uid_t | user_uid, | ||
| int * | id ) |
Definition at line 424 of file XrdFfsMisc.cc.
References MAXROOTURLLEN, ntoa24(), and XrdFfsMiscSecsss.
Referenced by XrdFfsPosix_deleteall(), XrdFfsPosix_readdirall(), XrdFfsPosix_renameall(), XrdFfsPosix_statall(), and XrdFfsPosix_truncateall().
Here is the call graph for this function:
Here is the caller graph for this function:| void XrdFfsMisc_xrd_secsss_init | ( | ) |
Definition at line 371 of file XrdFfsMisc.cc.
References XrdSecsssID::idDynamic, XrdFfsMiscSecsss, and XrdFfsMiscSssid.
Referenced by XrdFfsMisc_xrd_init().
Here is the caller graph for this function:| void XrdFfsMisc_xrd_secsss_register | ( | uid_t | user_uid, |
| gid_t | user_gid, | ||
| int * | id ) |
Definition at line 380 of file XrdFfsMisc.cc.
References XrdSecEntity::gid, XrdSecEntity::grps, iXrdConnPerUsr, XrdSecEntity::name, ntoa24(), nXrdConnPerUsr, XrdSecEntity::uid, url_mlock, XrdFfsMiscSecsss, and XrdFfsMiscSssid.
Here is the call graph for this function:| short iXrdConnPerUsr = 0 |
Definition at line 65 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_xrd_secsss_register().
| pthread_mutex_t url_mlock |
Definition at line 66 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_xrd_init(), and XrdFfsMisc_xrd_secsss_register().
| char XrdFfsMiscCururl[MAXROOTURLLEN] = "" |
Definition at line 125 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_get_all_urls(), and XrdFfsMisc_refresh_url_cache().
| int XrdFfsMiscNcachedurls = 0 |
Definition at line 127 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_get_all_urls(), XrdFfsMisc_get_list_of_data_servers(), and XrdFfsMisc_get_number_of_data_servers().
| bool XrdFfsMiscSecsss = false |
Definition at line 369 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_xrd_secsss_editurl(), XrdFfsMisc_xrd_secsss_init(), and XrdFfsMisc_xrd_secsss_register().
| XrdSecsssID* XrdFfsMiscSssid |
Definition at line 368 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_xrd_secsss_init(), and XrdFfsMisc_xrd_secsss_register().
| char* XrdFfsMiscUrlcache[XrdFfs_MAX_NUM_NODES] |
Definition at line 126 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_get_all_urls(), and XrdFfsMisc_get_list_of_data_servers().
| pthread_mutex_t XrdFfsMiscUrlcache_mutex = PTHREAD_MUTEX_INITIALIZER |
Definition at line 129 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_get_all_urls(), XrdFfsMisc_get_list_of_data_servers(), and XrdFfsMisc_refresh_url_cache().
| time_t XrdFfsMiscUrlcachelife = 60 |
Definition at line 130 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_get_all_urls(), and XrdFfsMisc_set_Urlcachelife().
| time_t XrdFfsMiscUrlcachetime = 0 |
Definition at line 128 of file XrdFfsMisc.cc.
Referenced by XrdFfsMisc_get_all_urls(), and XrdFfsMisc_refresh_url_cache().