GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/mountpoint.h
Date: 2026-05-10 02:36:07
Exec Total Coverage
Lines: 54 125 43.2%
Branches: 1 2 50.0%

Line Branch Exec Source
1 /**
2 * This file is part of the CernVM File System.
3 *
4 * Steers the booting of CernVM-FS repositories.
5 */
6
7 #ifndef CVMFS_MOUNTPOINT_H_
8 #define CVMFS_MOUNTPOINT_H_
9
10 #include <pthread.h>
11 #include <sys/statvfs.h>
12 #include <unistd.h>
13
14 #include <ctime>
15 #include <set>
16 #include <string>
17 #include <vector>
18
19 #include "cache.h"
20 #include "crypto/hash.h"
21 #include "duplex_testing.h"
22 #include "file_watcher.h"
23 #include "loader.h"
24 #include "magic_xattr.h"
25 #include "util/algorithm.h"
26
27 class AuthzAttachment;
28 class AuthzFetcher;
29 class AuthzSessionManager;
30 class BackoffThrottle;
31 class CacheManager;
32 namespace catalog {
33 class ClientCatalogManager;
34 class InodeAnnotation;
35 } // namespace catalog
36 struct ChunkTables;
37 namespace cvmfs {
38 class Fetcher;
39 class Uuid;
40 } // namespace cvmfs
41 namespace download {
42 class DownloadManager;
43 }
44 namespace glue {
45 class InodeTracker;
46 class DentryTracker;
47 class PageCacheTracker;
48 } // namespace glue
49 namespace lru {
50 class InodeCache;
51 class Md5PathCache;
52 class PathCache;
53 } // namespace lru
54 class NfsMaps;
55 class OptionsManager;
56 namespace perf {
57 class Counter;
58 class Statistics;
59 class TelemetryAggregator;
60 } // namespace perf
61 namespace signature {
62 class SignatureManager;
63 }
64 class SimpleChunkTables;
65 class Tracer;
66
67
68 /**
69 * Construction of FileSystem and MountPoint can go wrong. In this case, we'd
70 * like to know why. This is a base class for both FileSystem and MountPoint.
71 */
72 class BootFactory {
73 public:
74 1328 BootFactory() : boot_status_(loader::kFailUnknown) { }
75 13 bool IsValid() { return boot_status_ == loader::kFailOk; }
76 747 loader::Failures boot_status() { return boot_status_; }
77 22 std::string boot_error() { return boot_error_; }
78
79 /**
80 * Used in the fuse module to artificially set boot errors that are specific
81 * to the fuse boot procedure.
82 */
83 void set_boot_status(loader::Failures code) { boot_status_ = code; }
84
85 protected:
86 loader::Failures boot_status_;
87 std::string boot_error_;
88 };
89
90
91 /**
92 * The FileSystem object initializes cvmfs' global state. It sets up sqlite and
93 * the cache directory and it can contain multiple mount points. It currently
94 * does so only for libcvmfs; the cvmfs fuse module has exactly one FileSystem
95 * object and one MountPoint object.
96 */
97 class FileSystem : SingleCopy, public BootFactory {
98 FRIEND_TEST(T_MountPoint, MkCacheParm);
99 FRIEND_TEST(T_MountPoint, CacheSettings);
100 FRIEND_TEST(T_MountPoint, CheckInstanceName);
101 FRIEND_TEST(T_MountPoint, CheckPosixCacheSettings);
102 FRIEND_TEST(T_Cvmfs, Basics);
103
104 public:
105 enum Type {
106 kFsFuse = 0,
107 kFsLibrary
108 };
109
110 struct FileSystemInfo {
111 653 FileSystemInfo()
112 1306 : type(kFsFuse)
113 653 , options_mgr(NULL)
114 653 , wait_workspace(false)
115 653 , foreground(false) { }
116 /**
117 * Name can is used to identify this particular instance of cvmfs in the
118 * cache (directory). Normally it is the fully qualified repository name.
119 * For libcvmfs and in other special mount conditions, it can be something
120 * else. Only file systems with different names can share a cache because
121 * the name is part of a lock file.
122 */
123 std::string name;
124
125 /**
126 * Used to fork & execve into different flavors of the binary, e.g. the
127 * quota manager.
128 */
129 std::string exe_path;
130
131 /**
132 * Fuse mount point or libcvmfs.
133 */
134 Type type;
135
136 /**
137 * All further configuration has to be present in the options manager.
138 */
139 OptionsManager *options_mgr;
140
141 /**
142 * Decides if FileSystem construction should block if the workspace is
143 * currently taken. This is used to coordinate fuse mounts where the next
144 * mount happens while the previous fuse module is not yet fully cleaned
145 * up.
146 */
147 bool wait_workspace;
148 /**
149 * The fuse module should not daemonize. That means the quota manager
150 * should not daemonize, too, but print debug messages to stdout.
151 */
152 bool foreground;
153 };
154
155 /**
156 * Keeps information about I/O errors, e.g. writing local files, permanent
157 * network errors, etc. It counts the number of errors and the timestamp
158 * of the latest errors for consumption by monitoring tools such as Nagios
159 */
160 class IoErrorInfo {
161 public:
162 IoErrorInfo();
163
164 void Reset();
165 void AddIoError();
166 void SetCounter(perf::Counter *c);
167 int64_t count();
168 time_t timestamp_last();
169
170 private:
171 perf::Counter *counter_;
172 time_t timestamp_last_;
173 };
174
175 /**
176 * No NFS maps.
177 */
178 static const unsigned kNfsNone = 0x00;
179 /**
180 * Normal NFS maps by leveldb
181 */
182 static const unsigned kNfsMaps = 0x01;
183 /**
184 * NFS maps maintained by sqlite so that they can reside on an NFS mount
185 */
186 static const unsigned kNfsMapsHa = 0x02;
187
188 static FileSystem *Create(const FileSystemInfo &fs_info);
189 ~FileSystem();
190
191 // Used to setup logging before the file system object is created
192 static void SetupLoggingStandalone(const OptionsManager &options_mgr,
193 const std::string &prefix);
194
195 490 bool IsNfsSource() { return nfs_mode_ & kNfsMaps; }
196 4 bool IsHaNfsSource() { return nfs_mode_ & kNfsMapsHa; }
197 void ResetErrorCounters();
198 void TearDown2ReadOnly();
199 void RemapCatalogFd(int from, int to);
200
201 // Used in cvmfs' RestoreState to prevent change of cache manager type
202 // during reload
203 void ReplaceCacheManager(CacheManager *new_cache_mgr);
204
205 917 CacheManager *cache_mgr() { return cache_mgr_; }
206 24 std::string cache_mgr_instance() { return cache_mgr_instance_; }
207 std::string exe_path() { return exe_path_; }
208 8 bool found_previous_crash() { return found_previous_crash_; }
209 Log2Histogram *hist_fs_lookup() { return hist_fs_lookup_; }
210 Log2Histogram *hist_fs_forget() { return hist_fs_forget_; }
211 Log2Histogram *hist_fs_forget_multi() { return hist_fs_forget_multi_; }
212 Log2Histogram *hist_fs_getattr() { return hist_fs_getattr_; }
213 Log2Histogram *hist_fs_readlink() { return hist_fs_readlink_; }
214 Log2Histogram *hist_fs_opendir() { return hist_fs_opendir_; }
215 Log2Histogram *hist_fs_releasedir() { return hist_fs_releasedir_; }
216 Log2Histogram *hist_fs_readdir() { return hist_fs_readdir_; }
217 Log2Histogram *hist_fs_open() { return hist_fs_open_; }
218 Log2Histogram *hist_fs_read() { return hist_fs_read_; }
219 Log2Histogram *hist_fs_release() { return hist_fs_release_; }
220
221 perf::Counter *n_fs_dir_open() { return n_fs_dir_open_; }
222 perf::Counter *n_fs_forget() { return n_fs_forget_; }
223 perf::Counter *n_fs_inode_replace() { return n_fs_inode_replace_; }
224 perf::Counter *n_fs_lookup() { return n_fs_lookup_; }
225 perf::Counter *n_fs_lookup_negative() { return n_fs_lookup_negative_; }
226 perf::Counter *n_fs_open() { return n_fs_open_; }
227 perf::Counter *n_fs_read() { return n_fs_read_; }
228 perf::Counter *n_fs_readlink() { return n_fs_readlink_; }
229 175 perf::Counter *n_fs_stat() { return n_fs_stat_; }
230 perf::Counter *n_fs_stat_stale() { return n_fs_stat_stale_; }
231 perf::Counter *n_fs_statfs() { return n_fs_statfs_; }
232 perf::Counter *n_fs_statfs_cached() { return n_fs_statfs_cached_; }
233 IoErrorInfo *io_error_info() { return &io_error_info_; }
234 573 std::string name() { return name_; }
235 NfsMaps *nfs_maps() { return nfs_maps_; }
236 perf::Counter *no_open_dirs() { return no_open_dirs_; }
237 perf::Counter *no_open_files() { return no_open_files_; }
238 perf::Counter *n_eio_total() { return n_eio_total_; }
239 perf::Counter *n_eio_01() { return n_eio_01_; }
240 perf::Counter *n_eio_02() { return n_eio_02_; }
241 perf::Counter *n_eio_03() { return n_eio_03_; }
242 perf::Counter *n_eio_04() { return n_eio_04_; }
243 perf::Counter *n_eio_05() { return n_eio_05_; }
244 perf::Counter *n_eio_06() { return n_eio_06_; }
245 perf::Counter *n_eio_07() { return n_eio_07_; }
246 perf::Counter *n_eio_08() { return n_eio_08_; }
247 perf::Counter *n_emfile() { return n_emfile_; }
248 1121 OptionsManager *options_mgr() { return options_mgr_; }
249 577 perf::Statistics *statistics() { return statistics_; }
250 1109 Type type() { return type_; }
251 581 cvmfs::Uuid *uuid_cache() { return uuid_cache_; }
252 872 std::string workspace() { return workspace_; }
253
254 protected:
255 void SetHasCustomVfs(bool setting) { has_custom_sqlitevfs_ = setting; }
256
257 private:
258 /**
259 * Only one instance may be alive at any given time
260 */
261 static bool g_alive;
262 static const char *kDefaultCacheBase; // /var/lib/cvmfs
263 static const unsigned kDefaultQuotaLimit = 1024 * 1024 * 1024; // 1GB
264 static const unsigned kDefaultNfiles = 8192; // if CVMFS_NFILES is unset
265 static const char *kDefaultCacheMgrInstance; // "default"
266
267 struct PosixCacheSettings {
268 710 PosixCacheSettings()
269 710 : is_shared(false)
270 710 , is_alien(false)
271 710 , is_managed(false)
272 710 , avoid_rename(false)
273 710 , cache_base_defined(false)
274 710 , cache_dir_defined(false)
275 710 , quota_limit(0)
276 710 , do_refcount(true)
277 710 , cleanup_unused_first(false) { }
278 bool is_shared;
279 bool is_alien;
280 bool is_managed;
281 bool avoid_rename;
282 bool cache_base_defined;
283 bool cache_dir_defined;
284 /**
285 * Soft limit in bytes for the cache. The quota manager removes half the
286 * cache when the limit is exceeded.
287 */
288 int64_t quota_limit;
289 bool do_refcount;
290 bool cleanup_unused_first;
291 std::string cache_path;
292 /**
293 * Different from cache_path only if CVMFS_WORKSPACE or
294 * CVMFS_CACHE_WORKSPACE is set.
295 */
296 std::string workspace;
297 };
298
299 static void LogSqliteError(void *user_data __attribute__((unused)),
300 int sqlite_extended_error,
301 const char *message);
302
303 explicit FileSystem(const FileSystemInfo &fs_info);
304
305 void SetupLogging();
306 void CreateStatistics();
307 void SetupSqlite();
308 bool DetermineNfsMode();
309 bool SetupWorkspace();
310 bool SetupCwd();
311 bool LockWorkspace();
312 bool SetupCrashGuard();
313 bool SetupNfsMaps();
314 void SetupUuid();
315
316 std::string MkCacheParm(const std::string &generic_parameter,
317 const std::string &instance);
318 bool CheckInstanceName(const std::string &instance);
319 bool TriageCacheMgr();
320 CacheManager *SetupCacheMgr(const std::string &instance);
321 CacheManager *SetupPosixCacheMgr(const std::string &instance);
322 CacheManager *SetupRamCacheMgr(const std::string &instance);
323 CacheManager *SetupTieredCacheMgr(const std::string &instance);
324 CacheManager *SetupExternalCacheMgr(const std::string &instance);
325 PosixCacheSettings DeterminePosixCacheSettings(const std::string &instance);
326 bool CheckPosixCacheSettings(const PosixCacheSettings &settings);
327 bool SetupPosixQuotaMgr(const PosixCacheSettings &settings,
328 CacheManager *cache_mgr);
329
330 // See FileSystemInfo for the following fields
331 std::string name_;
332 std::string exe_path_;
333 Type type_;
334 /**
335 * Not owned by the FileSystem object
336 */
337 OptionsManager *options_mgr_;
338 bool wait_workspace_;
339 bool foreground_;
340
341 perf::Counter *n_fs_open_;
342 perf::Counter *n_fs_dir_open_;
343 perf::Counter *n_fs_lookup_;
344 perf::Counter *n_fs_lookup_negative_;
345 perf::Counter *n_fs_stat_;
346 perf::Counter *n_fs_stat_stale_;
347 perf::Counter *n_fs_statfs_;
348 perf::Counter *n_fs_statfs_cached_;
349 perf::Counter *n_fs_read_;
350 perf::Counter *n_fs_readlink_;
351 perf::Counter *n_fs_forget_;
352 perf::Counter *n_fs_inode_replace_;
353 perf::Counter *no_open_files_;
354 perf::Counter *no_open_dirs_;
355 perf::Counter *n_eio_total_;
356 perf::Counter *n_eio_01_;
357 perf::Counter *n_eio_02_;
358 perf::Counter *n_eio_03_;
359 perf::Counter *n_eio_04_;
360 perf::Counter *n_eio_05_;
361 perf::Counter *n_eio_06_;
362 perf::Counter *n_eio_07_;
363 perf::Counter *n_eio_08_;
364 perf::Counter *n_emfile_;
365 IoErrorInfo io_error_info_;
366 perf::Statistics *statistics_;
367
368 Log2Histogram *hist_fs_lookup_;
369 Log2Histogram *hist_fs_forget_;
370 Log2Histogram *hist_fs_forget_multi_;
371 Log2Histogram *hist_fs_getattr_;
372 Log2Histogram *hist_fs_readlink_;
373 Log2Histogram *hist_fs_opendir_;
374 Log2Histogram *hist_fs_releasedir_;
375 Log2Histogram *hist_fs_readdir_;
376 Log2Histogram *hist_fs_open_;
377 Log2Histogram *hist_fs_read_;
378 Log2Histogram *hist_fs_release_;
379
380 /**
381 * A writeable local directory. Only small amounts of data (few bytes) will
382 * be stored here. Needed because the cache can be read-only. The workspace
383 * and the cache directory can be identical. A workspace can be shared among
384 * FileSystem instances if their name is different.
385 */
386 std::string workspace_;
387 /**
388 * During setup, the fuse module changes its working directory to workspace.
389 * Afterwards, workspace_ is ".". Store the original one in
390 * workspace_fullpath_
391 */
392 std::string workspace_fullpath_;
393 int fd_workspace_lock_;
394 std::string path_workspace_lock_;
395
396 /**
397 * An empty file that is removed on proper shutdown.
398 */
399 std::string path_crash_guard_;
400
401 /**
402 * A crash guard was found, thus we assume the file system was not shutdown
403 * properly last time.
404 */
405 bool found_previous_crash_;
406
407 /**
408 * Only needed for fuse to detect and prevent double mounting at the same
409 * location.
410 */
411 std::string mountpoint_;
412 /**
413 * The user-provided name of the parimay cache manager or 'default' if none
414 * is specified.
415 */
416 std::string cache_mgr_instance_;
417 /**
418 * Keep track of all the cache instances to detect circular definitions with
419 * the tiered cache.
420 */
421 std::set<std::string> constructed_instances_;
422 std::string nfs_maps_dir_;
423 /**
424 * Combination of kNfs... flags
425 */
426 unsigned nfs_mode_;
427 CacheManager *cache_mgr_;
428 /**
429 * Persistent for the cache directory + name combination. It is used in the
430 * Geo-API to allow for per-client responses when no proxy is used.
431 */
432 cvmfs::Uuid *uuid_cache_;
433
434 /**
435 * TODO(jblomer): Move to MountPoint. Tricky because of the sqlite maps
436 * and the sqlite configuration done for the file catalogs.
437 */
438 NfsMaps *nfs_maps_;
439 /**
440 * Used internally to remember if the Sqlite memory manager need to be shut
441 * down.
442 */
443 bool has_custom_sqlitevfs_;
444 };
445
446 /**
447 * The StatfsCache class is a class purely designed as "struct" (= holding
448 * object for all its parameters).
449 * All its logic, including the locking mechanism, is implemented in the
450 * function cvmfs_statfs in cvmfs.cc
451 */
452 class StatfsCache : SingleCopy {
453 public:
454 245 explicit StatfsCache(uint64_t cacheValid)
455 245 : expiry_deadline_(0), cache_timeout_(cacheValid) {
456 245 memset(&info_, 0, sizeof(info_));
457 245 lock_ = reinterpret_cast<pthread_mutex_t *>(
458 245 smalloc(sizeof(pthread_mutex_t)));
459 245 const int retval = pthread_mutex_init(lock_, NULL);
460
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 245 times.
245 assert(retval == 0);
461 245 }
462 245 ~StatfsCache() {
463 245 pthread_mutex_destroy(lock_);
464 245 free(lock_);
465 245 }
466 uint64_t *expiry_deadline() { return &expiry_deadline_; }
467 const uint64_t cache_timeout() { return cache_timeout_; }
468 struct statvfs *info() { return &info_; }
469 pthread_mutex_t *lock() { return lock_; }
470
471 private:
472 pthread_mutex_t *lock_;
473 // Timestamp/deadline when the currently cached statvfs info_ becomes invalid
474 uint64_t expiry_deadline_;
475 // Time in seconds how long statvfs info_ should be cached
476 uint64_t cache_timeout_;
477 struct statvfs info_;
478 };
479
480 /**
481 * A MountPoint provides a clip around all the different *Manager objects that
482 * in combination represent a mounted cvmfs repository. Its main purpose is
483 * the controlled construction and deconstruction of the involved ensemble of
484 * classes based on the information passed from an options manager.
485 *
486 * A MountPoint is constructed on top of a successfully constructed FileSystem.
487 *
488 * We use pointers to manager classes to make the order of construction and
489 * destruction explicit and also to keep the include list for this header small.
490 */
491 class MountPoint : SingleCopy, public BootFactory {
492 public:
493 /**
494 * If catalog reload fails, try again in 3 minutes
495 */
496 static const unsigned kShortTermTTL = 180;
497 static const time_t kIndefiniteDeadline = time_t(-1);
498
499 static MountPoint *Create(const std::string &fqrn,
500 FileSystem *file_system,
501 OptionsManager *options_mgr = NULL);
502 ~MountPoint();
503
504 // Check whether permission is needed to read from user process environment
505 static bool NeedsReadEnviron(OptionsManager *omgr);
506
507 unsigned GetMaxTtlMn();
508 unsigned GetEffectiveTtlSec();
509 void SetMaxTtlMn(unsigned value_minutes);
510 void SetMaxTtlSec(unsigned value_secs);
511 void ReEvaluateAuthz();
512
513 AuthzSessionManager *authz_session_mgr() { return authz_session_mgr_; }
514 BackoffThrottle *backoff_throttle() { return backoff_throttle_; }
515 1056 catalog::ClientCatalogManager *catalog_mgr() { return catalog_mgr_; }
516 ChunkTables *chunk_tables() { return chunk_tables_; }
517 110 download::DownloadManager *download_mgr() { return download_mgr_; }
518 16 download::DownloadManager *external_download_mgr() {
519 16 return external_download_mgr_;
520 }
521 file_watcher::FileWatcher *resolv_conf_watcher() {
522 return resolv_conf_watcher_;
523 }
524 287 cvmfs::Fetcher *fetcher() { return fetcher_; }
525 bool fixed_catalog() { return fixed_catalog_; }
526 381 std::string fqrn() const { return fqrn_; }
527 // TODO(jblomer): use only a singler fetcher object
528 cvmfs::Fetcher *external_fetcher() { return external_fetcher_; }
529 AuthzFetcher *authz_fetcher() { return authz_fetcher_; };
530 287 FileSystem *file_system() { return file_system_; }
531 MagicXattrManager *magic_xattr_mgr() { return magic_xattr_mgr_; }
532 47 bool has_membership_req() { return has_membership_req_; }
533 bool enforce_acls() { return enforce_acls_; }
534 bool cache_symlinks() { return cache_symlinks_; }
535 bool fuse_expire_entry() { return fuse_expire_entry_; }
536 catalog::InodeAnnotation *inode_annotation() { return inode_annotation_; }
537 glue::InodeTracker *inode_tracker() { return inode_tracker_; }
538 lru::InodeCache *inode_cache() { return inode_cache_; }
539 double kcache_timeout_sec() { return kcache_timeout_sec_; }
540 340 lru::Md5PathCache *md5path_cache() { return md5path_cache_; }
541 std::string membership_req() { return membership_req_; }
542 glue::DentryTracker *dentry_tracker() { return dentry_tracker_; }
543 glue::PageCacheTracker *page_cache_tracker() { return page_cache_tracker_; }
544 lru::PathCache *path_cache() { return path_cache_; }
545 std::string repository_tag() { return repository_tag_; }
546 SimpleChunkTables *simple_chunk_tables() { return simple_chunk_tables_; }
547 861 perf::Statistics *statistics() { return statistics_; }
548 perf::TelemetryAggregator *telemetry_aggr() { return telemetry_aggr_; }
549 287 signature::SignatureManager *signature_mgr() { return signature_mgr_; }
550 uid_t talk_socket_uid() { return talk_socket_uid_; }
551 gid_t talk_socket_gid() { return talk_socket_gid_; }
552 std::string talk_socket_path() { return talk_socket_path_; }
553 Tracer *tracer() { return tracer_; }
554 cvmfs::Uuid *uuid() { return uuid_; }
555 StatfsCache *statfs_cache() { return statfs_cache_; }
556
557 bool ReloadBlacklists();
558 void DisableCacheSymlinks();
559 void EnableFuseExpireEntry();
560
561 MountPoint(const std::string &fqrn,
562 FileSystem *file_system,
563 OptionsManager *options_mgr);
564
565 private:
566 /**
567 * The maximum TTL can be used to cap a root catalogs registered ttl. By
568 * default this is disabled (= 0).
569 */
570 static const unsigned kDefaultMaxTtlSec = 0;
571 /**
572 * Let fuse cache dentries for 1 minute.
573 */
574 static const unsigned kDefaultKCacheTtlSec = 60;
575 /**
576 * Number of Md5Path entries in the libcvmfs cache.
577 */
578 static const unsigned kLibPathCacheSize = 32000;
579 /**
580 * Cache seven times more md5 paths than inodes in the fuse module.
581 */
582 static const unsigned kInodeCacheFactor = 7;
583 /**
584 * Default to 16M RAM for meta-data caches; does not include the inode tracker
585 */
586 static const unsigned kDefaultMemcacheSize = 16 * 1024 * 1024;
587 /**
588 * Where to look for external authz helpers.
589 */
590 static const char *kDefaultAuthzSearchPath; // "/usr/libexec/cvmfs/authz"
591 /**
592 * Maximum number of concurrent HTTP connections.
593 */
594 static const unsigned kDefaultNumConnections = 16;
595 /**
596 * Default network timeout
597 */
598 static const unsigned kDefaultTimeoutSec = 5;
599 static const unsigned kDefaultRetries = 1;
600 static const unsigned kDefaultBackoffInitMs = 2000;
601 static const unsigned kDefaultBackoffMaxMs = 10000;
602 /**
603 * Memory buffer sizes for an activated tracer
604 */
605 static const unsigned kTracerBufferSize = 8192;
606 static const unsigned kTracerFlushThreshold = 7000;
607 static const char *kDefaultBlacklist; // "/etc/cvmfs/blacklist"
608 /**
609 * Default values for telemetry aggregator
610 */
611 static const int kDefaultTelemetrySendRateSec = 5 * 60; // 5min
612 static const int kMinimumTelemetrySendRateSec = 5; // 5sec
613
614
615 void CreateStatistics();
616 void CreateAuthz();
617 bool CreateSignatureManager();
618 bool CheckBlacklists();
619 bool CreateDownloadManagers();
620 bool CreateResolvConfWatcher();
621 void CreateFetchers();
622 bool CreateCatalogManager();
623 void CreateTables();
624 bool CreateTracer();
625 bool SetupBehavior();
626 void SetupDnsTuning(download::DownloadManager *manager);
627 void SetupHttpTuning();
628 bool SetupExternalDownloadMgr(bool dogeosort);
629 void SetupInodeAnnotation();
630 bool SetupOwnerMaps();
631 bool DetermineRootHash(shash::Any *root_hash);
632 bool FetchHistory(std::string *history_path);
633 std::string ReplaceHosts(std::string hosts);
634 std::string GetUniqFileSuffix();
635
636 std::string fqrn_;
637 cvmfs::Uuid *uuid_;
638 /**
639 * In contrast to the manager objects, the FileSystem is not owned.
640 */
641 FileSystem *file_system_;
642 /**
643 * The options manager is not owned.
644 */
645 OptionsManager *options_mgr_;
646
647 perf::Statistics *statistics_;
648 perf::TelemetryAggregator *telemetry_aggr_;
649 AuthzFetcher *authz_fetcher_;
650 AuthzSessionManager *authz_session_mgr_;
651 AuthzAttachment *authz_attachment_;
652 BackoffThrottle *backoff_throttle_;
653 signature::SignatureManager *signature_mgr_;
654 download::DownloadManager *download_mgr_;
655 download::DownloadManager *external_download_mgr_;
656 cvmfs::Fetcher *fetcher_;
657 cvmfs::Fetcher *external_fetcher_;
658 catalog::InodeAnnotation *inode_annotation_;
659 catalog::ClientCatalogManager *catalog_mgr_;
660 ChunkTables *chunk_tables_;
661 SimpleChunkTables *simple_chunk_tables_;
662 lru::InodeCache *inode_cache_;
663 lru::PathCache *path_cache_;
664 lru::Md5PathCache *md5path_cache_;
665 Tracer *tracer_;
666 glue::InodeTracker *inode_tracker_;
667 glue::DentryTracker *dentry_tracker_;
668 glue::PageCacheTracker *page_cache_tracker_;
669 MagicXattrManager *magic_xattr_mgr_;
670 StatfsCache *statfs_cache_;
671
672 file_watcher::FileWatcher *resolv_conf_watcher_;
673
674 unsigned max_ttl_sec_;
675 pthread_mutex_t lock_max_ttl_;
676 double kcache_timeout_sec_;
677 bool fixed_catalog_;
678 bool enforce_acls_;
679 bool cache_symlinks_;
680 bool fuse_expire_entry_;
681 std::string repository_tag_;
682 std::vector<std::string> blacklist_paths_;
683
684 // TODO(jblomer): this should go in the catalog manager
685 std::string membership_req_;
686 bool has_membership_req_;
687
688 std::string talk_socket_path_;
689 uid_t talk_socket_uid_;
690 gid_t talk_socket_gid_;
691 }; // class MointPoint
692
693 #endif // CVMFS_MOUNTPOINT_H_
694
695