![]() |
CernVM-FS
2.11.0
|
#include <catalog_mgr_client.h>
Public Member Functions | |
ClientCatalogManager (MountPoint *mountpoint) | |
virtual | ~ClientCatalogManager () |
bool | InitFixed (const shash::Any &root_hash, bool alternative_path) |
shash::Any | GetRootHash () |
bool | IsRevisionBlacklisted () |
bool | offline_mode () const |
uint64_t | all_inodes () const |
uint64_t | loaded_inodes () const |
std::string | repo_name () const |
manifest::Manifest * | manifest () const |
int | root_fd () const |
![]() | |
AbstractCatalogManager (perf::Statistics *statistics) | |
virtual | ~AbstractCatalogManager () |
void | SetInodeAnnotation (InodeAnnotation *new_annotation) |
virtual bool | Init () |
LoadError | Remount (const bool dry_run) |
LoadError | ChangeRoot (const shash::Any &root_hash) |
void | DetachNested () |
bool | LookupPath (const PathString &path, const LookupOptions options, DirectoryEntry *entry) |
bool | LookupPath (const std::string &path, const LookupOptions options, DirectoryEntry *entry) |
bool | LookupXattrs (const PathString &path, XattrList *xattrs) |
bool | LookupNested (const PathString &path, PathString *mountpoint, shash::Any *hash, uint64_t *size) |
bool | ListCatalogSkein (const PathString &path, std::vector< PathString > *result_list) |
bool | Listing (const PathString &path, DirectoryEntryList *listing, const bool expand_symlink) |
bool | Listing (const PathString &path, DirectoryEntryList *listing) |
bool | Listing (const std::string &path, DirectoryEntryList *listing) |
bool | ListingStat (const PathString &path, StatEntryList *listing) |
bool | ListFileChunks (const PathString &path, const shash::Algorithms interpret_hashes_as, FileChunkList *chunks) |
void | SetOwnerMaps (const OwnerMap &uid_map, const OwnerMap &gid_map) |
void | SetCatalogWatermark (unsigned limit) |
shash::Any | GetNestedCatalogHash (const PathString &mountpoint) |
Statistics | statistics () const |
uint64_t | inode_gauge () |
bool | volatile_flag () const |
uint64_t | GetRevision () const |
uint64_t | GetTTL () const |
bool | HasExplicitTTL () const |
bool | GetVOMSAuthz (std::string *authz) const |
int | GetNumCatalogs () const |
std::string | PrintHierarchy () const |
std::string | PrintAllMemStatistics () const |
inode_t | GetRootInode () const |
Catalog * | GetRootCatalog () const |
inode_t | MangleInode (const inode_t inode) const |
catalog::Counters | LookupCounters (const PathString &path, std::string *subcatalog_path, shash::Any *hash) |
Protected Member Functions | |
LoadError | LoadCatalog (const PathString &mountpoint, const shash::Any &hash, std::string *catalog_path, shash::Any *catalog_hash) |
void | UnloadCatalog (const catalog::Catalog *catalog) |
catalog::Catalog * | CreateCatalog (const PathString &mountpoint, const shash::Any &catalog_hash, catalog::Catalog *parent_catalog) |
void | ActivateCatalog (catalog::Catalog *catalog) |
![]() | |
const std::vector< Catalog * > & | GetCatalogs () const |
Catalog * | MountCatalog (const PathString &mountpoint, const shash::Any &hash, Catalog *parent_catalog) |
bool | MountSubtree (const PathString &path, const Catalog *entry_point, bool can_listing, Catalog **leaf_catalog) |
Catalog * | LoadFreeCatalog (const PathString &mountpoint, const shash::Any &hash) |
bool | AttachCatalog (const std::string &db_path, Catalog *new_catalog) |
void | DetachCatalog (Catalog *catalog) |
void | DetachSubtree (Catalog *catalog) |
void | DetachSiblings (const PathString ¤t_tree) |
void | DetachAll () |
bool | IsAttached (const PathString &root_path, Catalog **attached_catalog) const |
Catalog * | FindCatalog (const PathString &path) const |
void | ReadLock () const |
void | WriteLock () const |
void | Unlock () const |
virtual void | EnforceSqliteMemLimit () |
![]() | |
SingleCopy () | |
Private Member Functions | |
LoadError | LoadCatalogCas (const shash::Any &hash, const std::string &name, const std::string &alt_catalog_path, std::string *catalog_path) |
Private Attributes | |
std::map< PathString, shash::Any > | loaded_catalogs_ |
std::map< PathString, shash::Any > | mounted_catalogs_ |
UniquePtr< manifest::Manifest > | manifest_ |
std::string | repo_name_ |
cvmfs::Fetcher * | fetcher_ |
signature::SignatureManager * | signature_mgr_ |
std::string | workspace_ |
bool | offline_mode_ |
uint64_t | all_inodes_ |
uint64_t | loaded_inodes_ |
bool | fixed_alt_root_catalog_ |
BackoffThrottle | backoff_throttle_ |
perf::Counter * | n_certificate_hits_ |
perf::Counter * | n_certificate_misses_ |
int | root_fd_ |
Friends | |
class | CachedManifestEnsemble |
Additional Inherited Members | |
![]() | |
typedef std::vector< Catalog * > | CatalogList |
typedef Catalog | catalog_t |
![]() | |
static const inode_t | kInodeOffset |
A catalog manager that uses a Fetcher to get file catalgs in the form of (virtual) file descriptors from a cache manager. Sqlite has a path based interface. This catalog manager returns <FILE DESCRIPTOR> as a path and thus requires a sqlite vfs that supports this syntax, such as the cvmfs default vfs for clients.
This class uses the Fetcher in order to get access to the download manager and the cache manager, too. It requires a download manager and a signature manager as it calls manifest::Fetch in order to get the manifest of new and updated root catalogs. It requires the cache manager to get access to the Unpin() method of the corresponding quota manager; loaded catalogs need to be unpinned when the class is destructed.
Definition at line 49 of file catalog_mgr_client.h.
|
explicit |
|
virtual |
|
protectedvirtual |
Triggered when the catalog is attached (db file opened)
Reimplemented from catalog::AbstractCatalogManager< Catalog >.
Definition at line 29 of file catalog_mgr_client.cc.
|
inline |
Definition at line 64 of file catalog_mgr_client.h.
Referenced by cvmfs::cvmfs_statfs().
|
protectedvirtual |
Create a new Catalog object. Every derived class has to implement this and return a newly created (derived) Catalog structure of it's desired type.
mountpoint | the future mountpoint of the catalog to create |
catalog_hash | the content hash of the catalog database |
parent_catalog | the parent of the catalog to create |
Implements catalog::AbstractCatalogManager< Catalog >.
Definition at line 69 of file catalog_mgr_client.cc.
shash::Any catalog::ClientCatalogManager::GetRootHash | ( | ) |
Definition at line 80 of file catalog_mgr_client.cc.
Referenced by RootHashMagicXattr::PrepareValueFenced().
bool catalog::ClientCatalogManager::InitFixed | ( | const shash::Any & | root_hash, |
bool | alternative_path | ||
) |
Specialized initialization that uses a fixed root hash.
Definition at line 91 of file catalog_mgr_client.cc.
Referenced by MountPoint::CreateCatalogManager().
bool catalog::ClientCatalogManager::IsRevisionBlacklisted | ( | ) |
Checks if the current repository revision is blacklisted. The format of the blacklist lines is '<REPO N' where REPO is the repository name, N is the revision number, and the two parts are separated by whitespace. Any revision of REPO less than N is blacklisted. Note: no extra characters are allowed after N, not even whitespace.
Definition at line 304 of file catalog_mgr_client.cc.
Referenced by MountPoint::CreateCatalogManager().
|
protectedvirtual |
Load the catalog and return a file name and the catalog hash. Derived class can decide if it wants to use the hash or the path. Both the input as well as the output hash can be 0.
Implements catalog::AbstractCatalogManager< Catalog >.
Definition at line 110 of file catalog_mgr_client.cc.
|
private |
Definition at line 255 of file catalog_mgr_client.cc.
Referenced by LoadCatalog().
|
inline |
Definition at line 65 of file catalog_mgr_client.h.
Referenced by cvmfs::cvmfs_statfs().
|
inline |
Definition at line 67 of file catalog_mgr_client.h.
Referenced by RepoMetainfoMagicXattr::PrepareValueFenced().
|
inline |
Definition at line 63 of file catalog_mgr_client.h.
Referenced by FuseRemounter::Spawn().
|
inline |
Definition at line 66 of file catalog_mgr_client.h.
Referenced by catalog::CachedManifestEnsemble::FetchCertificate().
|
inline |
Definition at line 68 of file catalog_mgr_client.h.
Referenced by RestoreState().
|
protectedvirtual |
Reimplemented from catalog::AbstractCatalogManager< Catalog >.
Definition at line 282 of file catalog_mgr_client.cc.
|
friend |
Definition at line 51 of file catalog_mgr_client.h.
|
private |
Definition at line 100 of file catalog_mgr_client.h.
Referenced by all_inodes().
|
private |
Definition at line 103 of file catalog_mgr_client.h.
|
private |
Definition at line 96 of file catalog_mgr_client.h.
Referenced by LoadCatalog(), LoadCatalogCas(), UnloadCatalog(), and ~ClientCatalogManager().
|
private |
fixed root hash but alternative url
Definition at line 102 of file catalog_mgr_client.h.
Referenced by InitFixed(), and LoadCatalog().
|
private |
Required for unpinning
Definition at line 90 of file catalog_mgr_client.h.
Referenced by CreateCatalog(), and LoadCatalog().
|
private |
Definition at line 101 of file catalog_mgr_client.h.
Referenced by loaded_inodes(), and UnloadCatalog().
|
private |
Definition at line 93 of file catalog_mgr_client.h.
Referenced by LoadCatalog(), and manifest().
|
private |
Definition at line 91 of file catalog_mgr_client.h.
Referenced by CreateCatalog(), GetRootHash(), LoadCatalog(), UnloadCatalog(), and ~ClientCatalogManager().
|
private |
Definition at line 104 of file catalog_mgr_client.h.
Referenced by ClientCatalogManager(), and catalog::CachedManifestEnsemble::FetchCertificate().
|
private |
Definition at line 105 of file catalog_mgr_client.h.
Referenced by ClientCatalogManager(), and catalog::CachedManifestEnsemble::FetchCertificate().
|
private |
cached copy used because there is no network
Definition at line 99 of file catalog_mgr_client.h.
Referenced by LoadCatalog(), and offline_mode().
|
private |
Definition at line 95 of file catalog_mgr_client.h.
Referenced by IsRevisionBlacklisted(), LoadCatalog(), and repo_name().
|
private |
File descriptor of first loaded catalog; used for mapping the root catalog file descriptor when restoring the cache manager after a fuse module reload
Definition at line 111 of file catalog_mgr_client.h.
Referenced by LoadCatalogCas(), and root_fd().
|
private |
Definition at line 97 of file catalog_mgr_client.h.
Referenced by IsRevisionBlacklisted(), and LoadCatalog().
|
private |
Definition at line 98 of file catalog_mgr_client.h.