21 #ifndef CVMFS_LIBCVMFS
22 #ifdef FUSE_CAP_EXPORT_SUPPORT
23 #define CVMFS_NFS_SUPPORT
25 #warning "No NFS support, Fuse too old"
48 #include "google/protobuf/stubs/common.h"
56 #ifdef CVMFS_NFS_SUPPORT
94 timestamp_last_ = time(NULL);
109 if (instance.length() > 24)
112 if (!instance_sanitizer.
IsValid(instance)) {
113 boot_error_ =
"invalid instance name (" + instance +
"), "
114 +
"only characters a-z, A-Z, 0-9, _ are allowed";
128 boot_error_ =
"Failure: shared local disk cache and alien cache mutually "
129 "exclusive. Please turn off shared local disk cache.";
134 boot_error_ =
"Failure: quota management and alien cache mutually "
135 "exclusive. Please turn off quota limit.";
142 boot_error_ =
"Failure: libcvmfs supports only unmanaged exclusive cache "
150 boot_error_ =
"'CVMFS_CACHE_BASE' and 'CVMFS_CACHE_DIR' are mutually "
181 const unsigned length_tempdir = file_system->
workspace_.length() + 1;
182 sqlite3_temp_directory =
static_cast<char *
>(sqlite3_malloc(length_tempdir));
183 snprintf(sqlite3_temp_directory,
219 "Overall number of file open operations");
221 "cvmfs.n_fs_dir_open",
"Overall number of directory open operations");
223 "Number of lookups");
225 "Number of negative lookups");
228 "cvmfs.n_fs_stat_stale",
229 "Number of stats for stale (open, meanwhile changed) regular files");
231 "Overall number of statsfs calls");
233 "cvmfs.n_fs_statfs_cached",
234 "Number of statsfs calls that accessed the cached statfs info");
237 "Number of links read");
239 "Number of inode forgets");
241 "cvmfs.n_fs_inode_replace",
242 "Number of stale inodes that got replaced by an up-to-date version");
244 "Number of currently opened files");
246 "cvmfs.no_open_dirs",
"Number of currently opened directories");
251 "EIO returned to calling process. Sum of individual eio counters");
253 "eio.01",
"EIO returned by cvmfs.cc:cvmfs_lookup() - lookup failed");
255 "EIO returned by cvmfs.cc:ReplyNegative() "
256 "- CVMFS-specific metadata not found");
259 "EIO returned by cvmfs.cc:cvmfs_opendir() - failed to open directory ");
261 "EIO returned by cvmfs.cc:cvmfs_open() "
262 "- chunked file does not have any chunks");
265 "EIO returned by cvmfs.cc:cvmfs_read() - failed to fetch chunk");
267 "eio.06",
"EIO returned by cvmfs.cc:cvmfs_open() - failed to open file");
269 "eio.07",
"EIO returned by cvmfs.cc:cvmfs_read() - failed to read chunk");
271 "eio.08",
"EIO returned by cvmfs.cc:cvmfs_read() - failed to read file");
274 "EMFILE returned by cvmfs.cc:cvmfs_read(): too many open files");
301 const string &instance) {
388 boot_error_ =
"Failure: libcvmfs does not support NFS export.";
460 if (sqlite3_temp_directory) {
461 sqlite3_free(sqlite3_temp_directory);
462 sqlite3_temp_directory = NULL;
491 google::protobuf::ShutdownProtobufLibrary();
528 int sqlite_extended_error,
529 const char *message) {
531 const int sqlite_error = sqlite_extended_error & 0xFF;
532 switch (sqlite_error) {
533 case SQLITE_INTERNAL:
539 case SQLITE_CANTOPEN:
551 sqlite_extended_error);
561 const string &instance) {
566 if ((generic_parameter ==
"CVMFS_CACHE_SHARED")
568 return "CVMFS_SHARED_CACHE";
570 if ((generic_parameter ==
"CVMFS_CACHE_ALIEN")
572 return "CVMFS_ALIEN_CACHE";
574 if ((generic_parameter ==
"CVMFS_CACHE_SERVER_MODE")
576 return "CVMFS_SERVER_CACHE_MODE";
578 if ((generic_parameter ==
"CVMFS_CACHE_QUOTA_LIMIT")
580 return "CVMFS_QUOTA_LIMIT";
582 return generic_parameter;
585 return "CVMFS_CACHE_" + instance +
"_" + generic_parameter.substr(12);
609 boot_error_ =
"circular cache definition: " + instance;
617 string instance_type;
619 instance_type =
"posix";
624 if (instance_type ==
"posix") {
626 }
else if (instance_type ==
"ram") {
628 }
else if (instance_type ==
"tiered") {
630 }
else if (instance_type ==
"external") {
633 boot_error_ =
"invalid cache manager type for '" + instance
634 +
"':" + instance_type;
646 vector<string> cmd_line;
661 if (!plugin_handle->
IsValid()) {
668 if (cache_mgr == NULL) {
669 boot_error_ =
"failed to create external cache manager for " + instance;
689 boot_error_ =
"Failed to setup posix cache '" + instance +
"' in "
690 + settings.
cache_path +
": " + strerror(errno);
697 const bool ignore_failure = settings.
is_alien;
714 uint64_t sz_cache_bytes;
728 if (optarg ==
"libc") {
730 }
else if (optarg ==
"heap") {
734 +
MkCacheParm(
"CVMFS_CACHE_MALLOC", instance) +
"="
741 std::max(static_cast<uint64_t>(40 * 1024 * 1024), sz_cache_bytes));
747 if (cache_mgr == NULL) {
748 boot_error_ =
"failed to create ram cache manager for " + instance;
781 if (tiered == NULL) {
782 boot_error_ =
"Failed to setup tiered cache manager " + instance;
787 MkCacheParm(
"CVMFS_CACHE_LOWER_READONLY", instance), &optarg)
802 "looks like cvmfs has been crashed previously");
847 setenv(
"CVMFS_ARCH",
GetArch().c_str(), 1 );
852 const std::string &prefix) {
856 if (options_mgr.
GetValue(
"CVMFS_SYSLOG_LEVEL", &optarg))
858 if (options_mgr.
GetValue(
"CVMFS_SYSLOG_FACILITY", &optarg))
860 if (options_mgr.
GetValue(
"CVMFS_USYSLOG", &optarg))
862 if (options_mgr.
GetValue(
"CVMFS_DEBUGLOG", &optarg))
864 if (options_mgr.
GetValue(
"CVMFS_SYSLOG_PREFIX", &optarg)) {
878 #ifdef CVMFS_NFS_SUPPORT
882 string no_nfs_sentinel;
886 no_nfs_sentinel = posix_cache_mgr->
cache_path() +
"/no_nfs_maps." +
name_;
889 const bool ignore_failure = posix_cache_mgr->
alien_cache();
890 CreateFile(no_nfs_sentinel, 0600, ignore_failure);
895 boot_error_ =
"NFS source only works with POSIX cache manager.";
904 if (!no_nfs_sentinel.empty() &&
FileExists(no_nfs_sentinel)) {
905 boot_error_ =
"Cache was used without NFS maps before. "
906 "It has to be wiped out.";
915 boot_error_ =
"Cache directory and workspace must be identical for "
952 if (tokens.size() != 2) {
953 boot_error_ =
"invalid format for CVMFS_NFS_INTERLEAVED_INODES: "
973 const int64_t quota_threshold = settings.
quota_limit / 2;
977 "using workspace %s to protect cache database in %s",
979 cache_workspace +=
":" + settings.
workspace;
989 if (quota_mgr == NULL) {
990 boot_error_ =
"Failed to initialize shared lru cache";
999 if (quota_mgr == NULL) {
1008 "cache is already beyond quota size "
1009 "(size: %" PRId64
", capacity: %" PRId64
"), cleaning up",
1011 if (!quota_mgr->
Cleanup(quota_threshold)) {
1022 "CernVM-FS: quota initialized, current size %luMB",
1023 quota_mgr->
GetSize() / (1024 * 1024));
1034 assert(retval == SQLITE_OK);
1035 retval = sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
1036 assert(retval == SQLITE_OK);
1040 retval = sqlite3_vfs_register(sqlite3_vfs_find(
"unix-none"), 1);
1041 assert(retval == SQLITE_OK);
1062 boot_error_ =
"'CVMFS_CACHE_BASE' and 'CVMFS_CACHE_DIR' are mutually "
1075 const int mode = 0770;
1097 "failed to load/store %s/uuid",
workspace_.c_str());
1099 assert(uuid_cache_ != NULL);
1135 && !instance.empty()) {
1175 bool append =
false;
1178 boot_error_ =
"failed to load blacklist " + blacklist;
1185 string config_repository_path;
1187 blacklist = config_repository_path +
"blacklist";
1191 boot_error_ =
"failed to load blacklist from config repository";
1207 const bool result =
true;
1208 bool append =
false;
1246 if (options_mgr == NULL)
1249 new MountPoint(fqrn, file_system, options_mgr));
1291 string authz_helper;
1293 authz_helper = optarg;
1296 authz_search_path = optarg;
1323 if (root_hash.
IsNull()) {
1327 const bool alt_root_path =
1333 boot_error_ =
"Failed to initialize root file catalog";
1352 unsigned soft_limit;
1353 unsigned hard_limit;
1376 if (optarg.compare(
"EXTERNAL") == 0) {
1401 "Development option: Activate ignore signature failures during "
1403 "DO NOT USE IN PRODUCTION");
1409 string forced_proxy_template;
1411 forced_proxy_template = optarg;
1413 forced_proxy_template);
1422 if (proxies ==
"") {
1423 boot_error_ =
"failed to discover HTTP proxy servers";
1427 string fallback_proxies;
1429 fallback_proxies = optarg;
1440 std::vector<std::string> host_chain;
1442 if (max_servers > 0 && max_servers < host_chain.size()) {
1443 host_chain.resize(max_servers);
1463 if (optarg.size() > 1000) {
1465 "CVMFS_HTTP_TRACING_HEADERS too large ( max 1000 chars, given "
1469 std::vector<std::string> tokens =
SplitString(optarg,
'|');
1472 for (
unsigned int i = 0; i < tokens.size(); i++) {
1473 const std::string token =
Trim(tokens[i]);
1475 std::vector<std::string> key_val =
SplitString(token,
':');
1477 if (key_val.size() != 2) {
1479 "Http tracing header: Skipping current token part of "
1480 "CVMFS_HTTP_TRACING_HEADERS! Invalid "
1481 "<key:value> pair. Token: %s",
1486 const std::string prefix =
"X-CVMFS-";
1487 const std::string key =
Trim(key_val[0]);
1489 if (!sanitizer.
IsValid(key)) {
1491 "Http tracing header: Skipping current token part of "
1492 "CVMFS_HTTP_TRACING_HEADERS! Invalid key. Only "
1493 "alphanumeric keys "
1494 "are allowed (a-z, A-Z, 0-9). Token: %s",
1499 const std::string final_token =
1500 prefix + key +
": " +
Trim(key_val[1]);
1512 std::string roaming_value;
1517 "DNS roaming is enabled for this repository.");
1529 "DNS roaming is disabled for this repository.");
1555 public_keys = optarg;
1570 if (public_keys.size() > 0) {
1572 public_keys.c_str());
1588 "overall number of accessed inodes");
1590 "overall number of evicted inodes");
1592 "currently active inodes");
1594 "overall number of inode lookups");
1596 "overall number of successful path lookups");
1598 "overall number of unsuccessful path lookups");
1601 "overall number of added negative cache entries");
1603 "overall number of evicted negative cache entries");
1605 "overall number of prune calls");
1608 "overall number of added page cache entries");
1610 "overall number of evicted page cache entries");
1612 "overall number of direct I/O open calls");
1614 "page_cache_tracker.n_open_flush",
1615 "overall number of open calls where the file's page cache gets flushed");
1617 "page_cache_tracker.n_open_cached",
1618 "overall number of open calls where the file's page cache is reused");
1641 const unsigned memcache_num_units = mem_cache_size
1642 /
static_cast<unsigned>(
1643 memcache_unit_size);
1645 const unsigned mask_64 = ~((1 << 6) - 1);
1671 boot_error_ =
"tracer is only supported in the fuse module";
1675 const string tracebuffer_file = optarg;
1685 assert(tracebuffer_size <= INT_MAX && tracebuffer_threshold <= INT_MAX);
1687 "Initialising tracer with buffer size %" PRIu64
1688 " and threshold %" PRIu64,
1689 tracebuffer_size, tracebuffer_threshold);
1710 string history_path;
1718 "failed to open history database (%s)", history_path.c_str());
1727 string repository_date;
1731 if (repository_utctime == 0) {
1732 boot_error_ =
"invalid timestamp in CVMFS_REPOSITORY_DATE: "
1733 + repository_date +
". Use YYYY-MM-DDTHH:MM:SSZ";
1737 retval = tag_db->GetByDate(repository_utctime, &tag);
1739 boot_error_ =
"no repository state as early as utc timestamp "
1745 "time stamp %s UTC resolved to tag '%s'",
1774 if (history_hash.
IsNull()) {
1804 return max_ttl ? std::min(max_ttl, catalog_ttl_sec) : catalog_ttl_sec;
1827 , uuid_(cvmfs::Uuid::
Create(
""))
1831 , telemetry_aggr_(NULL)
1832 , authz_fetcher_(NULL)
1833 , authz_session_mgr_(NULL)
1834 , authz_attachment_(NULL)
1835 , backoff_throttle_(NULL)
1838 , external_download_mgr_(NULL)
1840 , external_fetcher_(NULL)
1841 , inode_annotation_(NULL)
1843 , chunk_tables_(NULL)
1844 , simple_chunk_tables_(NULL)
1845 , inode_cache_(NULL)
1847 , md5path_cache_(NULL)
1849 , inode_tracker_(NULL)
1850 , dentry_tracker_(NULL)
1851 , page_cache_tracker_(NULL)
1852 , statfs_cache_(NULL)
1853 , resolv_conf_watcher_(NULL)
1854 , max_ttl_sec_(kDefaultMaxTtlSec)
1855 , kcache_timeout_sec_(static_cast<double>(kDefaultKCacheTtlSec))
1856 , fixed_catalog_(false)
1857 , enforce_acls_(false)
1858 , cache_symlinks_(false)
1859 , fuse_expire_entry_(false)
1860 , has_membership_req_(false)
1861 , talk_socket_path_(std::string(
"./cvmfs_io.") + fqrn)
1862 , talk_socket_uid_(0)
1863 , talk_socket_gid_(0) {
1864 const int retval = pthread_mutex_init(&
lock_max_ttl_, NULL);
1941 uint64_t statfs_time_cache_valid = 0;
1943 statfs_time_cache_valid =
static_cast<uint64_t
>(
String2Uint64(optarg));
1946 static_cast<int>(statfs_time_cache_valid));
1958 if (
ToUpper(optarg) ==
"ROOTONLY") {
1960 }
else if (
ToUpper(optarg) ==
"NEVER") {
1962 }
else if (
ToUpper(optarg) ==
"ALWAYS") {
1966 "unsupported setting: CVMFS_MAGIC_XATTRS_VISIBILITY=%s",
1971 std::set<gid_t> protected_xattr_gids;
1973 std::vector<string> tmp =
SplitString(optarg,
',');
1975 for (
size_t i = 0; i < tmp.size(); i++) {
1976 const std::string trimmed =
Trim(tmp[i]);
1979 protected_xattr_gids.insert(static_cast<gid_t>(
String2Uint64(trimmed)));
1982 std::set<std::string> protected_xattrs;
1984 std::vector<string> tmp =
SplitString(optarg,
',');
1986 for (
size_t i = 0; i < tmp.size(); i++) {
1987 const std::string trimmed =
Trim(tmp[i]);
1990 protected_xattrs.insert(trimmed);
1994 if (protected_xattr_gids.count(0) < 1) {
1995 protected_xattr_gids.insert(0);
1997 "Automatically added root to have access to protected xattrs.");
2001 this, xattr_visibility, protected_xattrs, protected_xattr_gids);
2021 boot_error_ =
"unknown owner of cvmfs_talk socket: " + optarg;
2033 telemetry_send_rate_sec =
static_cast<int>(
String2Uint64(optarg));
2042 telemetry_send_rate_sec,
2048 "Enable telemetry to report every %d seconds",
2049 telemetry_send_rate_sec);
2107 unsigned timeout_direct;
2126 std::vector<std::string> host_chain;
2137 std::vector<std::string> host_chain;
2139 if (max_servers > 0 && max_servers < host_chain.size()) {
2140 host_chain.resize(max_servers);
2145 string proxies =
"DIRECT";
2151 if (proxies ==
"") {
2152 boot_error_ =
"failed to discover external HTTP proxy servers";
2157 string fallback_proxies;
2159 fallback_proxies = optarg;
2238 if (!uid_map.Read(optarg)) {
2239 boot_error_ =
"failed to parse uid map " + optarg;
2245 if (!gid_map.Read(optarg)) {
2246 boot_error_ =
"failed to parse gid map " + optarg;
perf::Counter * n_eio_07_
IoErrorInfo io_error_info_
OptionsManager * options_mgr()
static const unsigned kDnsDefaultTimeoutMs
bool GetVOMSAuthz(std::string *authz) const
void SetLogSyslogFacility(const int local_facility)
FileSystem * file_system_
Counter * Register(const std::string &name, const std::string &desc)
void SetCounter(perf::Counter *c)
void RegisterFdMapping(int from, int to)
std::string nfs_maps_dir_
void SetLogSyslogLevel(const int level)
void Activate(const int buffer_size, const int flush_threshold, const std::string &trace_file)
download::DownloadManager * download_mgr_
perf::Counter * n_eio_08_
perf::Counter * n_emfile_
Log2Histogram * hist_fs_forget_multi_
perf::Counter * n_fs_statfs_cached_
static FileWatcher * Create()
void SetupInodeAnnotation()
catalog::InodeAnnotation * inode_annotation_
static NfsMapsSqlite * Create(const std::string &db_dir, const uint64_t root_inode, const bool rebuild, perf::Statistics *statistics_)
std::string workspace_fullpath_
static SqliteHistory * Open(const std::string &file_name)
void SetHostChain(const std::string &host_list)
static const unsigned kTracerFlushThreshold
virtual uint64_t GetSize()
static Publisher * Create(const SettingsPublisher &settings)
void SetMetalinkChain(const std::string &metalink_list)
void SetLowSpeedLimit(const unsigned low_speed_limit)
perf::Counter * n_fs_stat_stale_
Log2Histogram * hist_fs_opendir_
bool volatile_flag() const
virtual bool Cleanup(const uint64_t leave_size)
double kcache_timeout_sec_
signature::SignatureManager * signature_mgr_
void CreateFile(const std::string &path, const int mode, const bool ignore_failure)
perf::Counter * n_fs_lookup_
AuthzSessionManager * authz_session_mgr_
static const unsigned kDefaultRetries
string Trim(const string &raw, bool trim_newline)
string JoinStrings(const vector< string > &strings, const string &joint)
int fd_connection() const
perf::Statistics * statistics_
download::DownloadManager * download_mgr_
static const unsigned kDefaultTimeoutSec
bool CheckInstanceName(const std::string &instance)
perf::Statistics * statistics_
Log2Histogram * hist_fs_readlink_
static void SetupLoggingStandalone(const OptionsManager &options_mgr, const std::string &prefix)
void SetProxyChain(const std::string &proxy_list, const std::string &fallback_proxy_list, const ProxySetModes set_mode)
static NfsMapsLeveldb * Create(const std::string &leveldb_dir, const uint64_t root_inode, const bool rebuild, perf::Statistics *statistics)
perf::Counter * n_eio_total_
bool IsOn(const std::string ¶m_value) const
std::string GetUniqFileSuffix()
StatfsCache * statfs_cache_
download::DownloadManager * external_download_mgr_
MagicXattrManager * magic_xattr_mgr_
static const size_t kDefaultBufferSize
CacheManager * SetupCacheMgr(const std::string &instance)
const SettingsPublisher & settings() const
perf::Statistics * statistics_
static const char * kDefaultBlacklist
virtual bool AcquireQuotaManager(QuotaManager *quota_mgr)
static const unsigned kDefaultMaxTtl
bool CreateDownloadManagers()
std::string talk_socket_path_
perf::Counter * n_fs_stat_
perf::Counter * n_eio_05_
perf::Counter * no_open_files_
assert((mem||(size==0))&&"Out Of Memory")
void ReplaceCacheManager(CacheManager *new_cache_mgr)
static const int kLabelHistory
static void SetupGlobalEnvironmentParams()
bool UnregisterVfsRdOnly()
CacheManager * SetupRamCacheMgr(const std::string &instance)
static void LogSqliteError(void *user_data __attribute__((unused)), int sqlite_extended_error, const char *message)
static void CleanupInstance()
void EnableFuseExpireEntry()
static const unsigned kNfsMaps
string StringifyTime(const time_t seconds, const bool utc)
PosixCacheSettings DeterminePosixCacheSettings(const std::string &instance)
void SetDnsServer(const std::string &address)
void AssignGlobalArenas()
DownloadManager * Clone(const perf::StatisticsTemplate &statistics, const std::string &cloned_name)
virtual CacheManagerIds id()=0
void SetLogMicroSyslog(const std::string &filename)
bool IsOff(const std::string ¶m_value) const
perf::Counter * n_eio_01_
bool HasConfigRepository(const std::string &fqrn, std::string *config_path)
std::set< std::string > constructed_instances_
bool DetermineRootHash(shash::Any *root_hash)
static double GetEntrySize()
#define SetLogDebugFile(filename)
void SetTimeout(const unsigned seconds_proxy, const unsigned seconds_direct)
bool CreateCatalogManager()
struct cvmcache_object_info __attribute__
void RemapCatalogFd(int from, int to)
static const unsigned kNfsNone
std::string path_crash_guard_
IntegerMap< uint64_t > OwnerMap
catalog::WritableCatalogManager * catalog_mgr_
static const char * kDefaultAuthzSearchPath
FileSystem(const FileSystemInfo &fs_info)
static const unsigned kLibPathCacheSize
void SetFqrn(const std::string &fqrn)
OptionsManager * options_mgr_
Log2Histogram * hist_fs_getattr_
Log2Histogram * hist_fs_releasedir_
bool FileExists(const std::string &path)
void ReplaceCacheManager(CacheManager *new_cache_mgr)
void DisableCacheSymlinks()
void SetDnsTtlLimits(const unsigned min_seconds, const unsigned max_seconds)
perf::Counter * n_fs_readlink_
int64_t String2Int64(const string &value)
void SetMaxTtlMn(unsigned value_minutes)
string ToUpper(const string &mixed_case)
static const unsigned kDefaultBackoffInitMs
perf::Counter * n_fs_forget_
MountPoint(const std::string &fqrn, FileSystem *file_system, OptionsManager *options_mgr)
void GetLimitNoFile(unsigned *soft_limit, unsigned *hard_limit)
void SetProxyGroupResetDelay(const unsigned seconds)
static CacheManager * Create(CacheManager *upper_cache, CacheManager *lower_cache)
static const unsigned kDefaultNumConnections
void Set(const int64_t val)
static const unsigned kNfsMapsHa
lru::Md5PathCache * md5path_cache_
vector< string > SplitString(const string &str, char delim)
static TelemetryAggregator * Create(Statistics *statistics, int send_rate, OptionsManager *options_mgr, MountPoint *mount_point, const std::string &fqrn, const TelemetrySelector type)
static PosixCacheManager * Create(const std::string &cache_path, const bool alien_cache, const RenameWorkarounds rename_workaround=kRenameNormal, const bool do_refcount=true)
bool RegisterVfsRdOnly(CacheManager *cache_mgr, perf::Statistics *statistics, const VfsOptions options)
static AuthzSessionManager * Create(AuthzFetcher *authz_fetcher, perf::Statistics *statistics)
std::string membership_req_
glue::DentryTracker * dentry_tracker_
int Fetch(const CacheManager::LabeledObject &object, const std::string &alt_url="")
perf::Counter * n_fs_read_
signature::SignatureManager * signature_mgr_
perf::Counter * n_eio_06_
static const char * kDefaultCacheMgrInstance
bool HasSuffix(const std::string &str, const std::string &suffix, const bool ignore_case)
bool IsRevisionBlacklisted()
virtual uint64_t GetCapacity()
glue::PageCacheTracker * page_cache_tracker_
bool SetShardingPolicy(const ShardingPolicySelector type)
bool found_previous_crash_
const char kSuffixCatalog
loader::Failures boot_status_
Failures Fetch(const std::string &base_url, const std::string &repository_name, const uint64_t minimum_timestamp, const shash::Any *base_catalog, signature::SignatureManager *signature_manager, download::DownloadManager *download_manager, ManifestEnsemble *ensemble)
bool CheckPosixCacheSettings(const PosixCacheSettings &settings)
perf::TelemetryAggregator * telemetry_aggr_
perf::Counter * n_fs_inode_replace_
ChunkTables * chunk_tables_
CacheManager * cache_mgr()
void SetupDnsTuning(download::DownloadManager *manager)
cvmfs::Uuid * uuid_cache_
unsigned GetEffectiveTtlSec()
int TryLockFile(const std::string &path)
bool MkdirDeep(const std::string &path, const mode_t mode, bool verify_writable)
int LockFile(const std::string &path)
void SetIpPreference(const dns::IpPreference preference)
static const unsigned kDefaultBackoffMaxMs
lru::InodeCache * inode_cache_
CacheManager * SetupPosixCacheMgr(const std::string &instance)
download::DownloadManager * download_mgr()
perf::Counter * n_fs_open_
static uint64_t RoundUp8(const uint64_t size)
bool SetupPosixQuotaMgr(const PosixCacheSettings &settings, CacheManager *cache_mgr)
static SqliteMemoryManager * GetInstance()
static PosixQuotaManager * Create(const std::string &cache_workspace, const uint64_t limit, const uint64_t cleanup_threshold, const bool rebuild_database)
void SetRetryParameters(const unsigned max_retries, const unsigned backoff_init_ms, const unsigned backoff_max_ms)
string StringifyInt(const int64_t value)
static const unsigned kInodeCacheFactor
void SetMaxIpaddrPerProxy(unsigned limit)
void EnableIgnoreSignatureFailures()
void Inc(class Counter *counter)
bool HasPrefix(const string &str, const string &prefix, const bool ignore_case)
perf::Counter * n_eio_04_
Log2Histogram * hist_fs_readdir_
bool GetValue(const std::string &key, std::string *value) const
void SetExternalDownloadManager(download::DownloadManager *download_mgr)
OptionsManager * options_mgr_
bool LoadBlacklist(const std::string &path_blacklist, bool append)
BackoffThrottle * backoff_throttle_
AuthzAttachment * authz_attachment_
void SetProxyTemplates(const std::string &direct, const std::string &forced)
SimpleChunkTables * simple_chunk_tables_
bool InitFixed(const shash::Any &root_hash, bool alternative_path)
perf::Counter * n_eio_03_
static const unsigned kDefaultNfiles
static FileSystem * Create(const FileSystemInfo &fs_info)
bool has_custom_sqlitevfs_
perf::Counter * n_fs_statfs_
time_t IsoTimestamp2UtcTime(const std::string &iso8601)
static Uuid * Create(const std::string &store_path)
pthread_mutex_t lock_max_ttl_
static const char * kDefaultCacheBase
string ResolveProxyDescription(const string &cvmfs_proxies, const std::string &path_fallback_cache, DownloadManager *download_manager)
uint64_t String2Uint64(const string &value)
static const unsigned kTracerBufferSize
perf::Counter * n_eio_02_
catalog::ClientCatalogManager * catalog_mgr_
void UseSystemCertificatePath()
bool CreateSignatureManager()
std::string error_msg() const
bool GetUidOf(const std::string &username, uid_t *uid, gid_t *main_gid)
static ExternalCacheManager * Create(int fd_connection, unsigned max_open_fds, const std::string &ident)
AuthzFetcher * authz_fetcher_
bool FetchHistory(std::string *history_path)
perf::Statistics * statistics()
shash::Any history() const
static const unsigned kDefaultQuotaLimit
static PosixQuotaManager * CreateShared(const std::string &exe_path, const std::string &cache_workspace, const uint64_t limit, const uint64_t cleanup_threshold, bool foreground)
void ResetErrorCounters()
Log2Histogram * hist_fs_lookup_
bool LoadPublicRsaKeys(const std::string &path_list)
void SetRegularDownloadManager(download::DownloadManager *download_mgr)
void RegisterHandler(const std::string &file_path, EventHandler *handler)
void GetTimeout(unsigned *seconds_proxy, unsigned *seconds_direct)
static const unsigned kDefaultMemcacheSize
void SetFailoverIndefinitely()
FileSystem * file_system_
std::string repository_tag_
static const unsigned kDefaultMinTtl
void SetDnsParameters(const unsigned retries, const unsigned timeout_ms)
bool CreateResolvConfWatcher()
Any MkFromHexPtr(const HexPtr hex, const char suffix)
static ExternalQuotaManager * Create(ExternalCacheManager *cache_mgr)
Log2Histogram * hist_fs_read_
void SetCatalogWatermark(unsigned limit)
void SetMetalinkResetDelay(const unsigned seconds)
std::vector< std::string > blacklist_paths_
cvmfs::Fetcher * fetcher_
file_watcher::FileWatcher * resolv_conf_watcher_
static const unsigned kDnsDefaultRetries
bool GeoSortServers(std::vector< std::string > *servers, std::vector< uint64_t > *output_order=NULL)
bool SetupExternalDownloadMgr(bool dogeosort)
void SetOwnerMaps(const OwnerMap &uid_map, const OwnerMap &gid_map)
CacheManager * SetupExternalCacheMgr(const std::string &instance)
static void CleanupInstance()
perf::Counter * n_fs_lookup_negative_
Log2Histogram * hist_fs_open_
virtual bool AcquireQuotaManager(QuotaManager *quota_mgr)=0
std::string cache_mgr_instance_
std::string path_workspace_lock_
virtual void IncGeneration(const uint64_t by)=0
Log2Histogram * hist_fs_release_
void SetLogSyslogPrefix(const std::string &prefix)
std::string MakeCanonicalPath(const std::string &path)
static const int kDefaultTelemetrySendRateSec
OptionsManager * options_mgr_
perf::Counter * no_open_dirs_
glue::InodeTracker * inode_tracker_
static PluginHandle * CreatePlugin(const std::string &locator, const std::vector< std::string > &cmd_line)
bool IsDefined(const std::string &key)
static const int kMinimumTelemetrySendRateSec
void GetHostInfo(std::vector< std::string > *host_chain, std::vector< int > *rtt, unsigned *current_host)
void set_membership(const std::string &m)
CacheManager * SetupTieredCacheMgr(const std::string &instance)
std::vector< std::string > FindFilesBySuffix(const std::string &dir, const std::string &suffix)
lru::PathCache * path_cache_
CacheManager * cache_mgr_
static const inode_t kInodeOffset
void AddHTTPTracingHeader(const std::string &header)
void SetCredentialsAttachment(CredentialsAttachment *ca)
static ClientCtx * GetInstance()
virtual bool AcquireQuotaManager(QuotaManager *quota_mgr)
cvmfs::Uuid * uuid_cache()
cvmfs::Fetcher * external_fetcher_
perf::Counter * n_fs_dir_open_
std::string MkCacheParm(const std::string &generic_parameter, const std::string &instance)
void UnlockFile(const int filedes)
download::DownloadManager * external_download_mgr()
void SetInodeAnnotation(InodeAnnotation *new_annotation)
virtual void SetInodeResidue(unsigned residue_class, unsigned remainder)
void SetHostResetDelay(const unsigned seconds)
static MountPoint * Create(const std::string &fqrn, FileSystem *file_system, OptionsManager *options_mgr=NULL)
Log2Histogram * hist_fs_forget_
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)