CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
catalog::AbstractCatalogManager< CatalogT > Class Template Referenceabstract

#include <catalog.h>

Inheritance diagram for catalog::AbstractCatalogManager< CatalogT >:
Collaboration diagram for catalog::AbstractCatalogManager< CatalogT >:

Public Types

typedef std::vector< CatalogT * > CatalogList
 
typedef CatalogT catalog_t
 

Public Member Functions

 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
 
CatalogT * GetRootCatalog () const
 
inode_t MangleInode (const inode_t inode) const
 
catalog::Counters LookupCounters (const PathString &path, std::string *subcatalog_path)
 

Static Public Attributes

static const inode_t kInodeOffset = 255
 

Protected Member Functions

virtual LoadError LoadCatalog (const PathString &mountpoint, const shash::Any &hash, std::string *catalog_path, shash::Any *catalog_hash)=0
 
virtual void UnloadCatalog (const CatalogT *catalog)
 
virtual void ActivateCatalog (CatalogT *catalog)
 
const std::vector< CatalogT * > & GetCatalogs () const
 
virtual CatalogT * CreateCatalog (const PathString &mountpoint, const shash::Any &catalog_hash, CatalogT *parent_catalog)=0
 
CatalogT * MountCatalog (const PathString &mountpoint, const shash::Any &hash, CatalogT *parent_catalog)
 
bool MountSubtree (const PathString &path, const CatalogT *entry_point, bool can_listing, CatalogT **leaf_catalog)
 
CatalogT * LoadFreeCatalog (const PathString &mountpoint, const shash::Any &hash)
 
bool AttachCatalog (const std::string &db_path, CatalogT *new_catalog)
 
void DetachCatalog (CatalogT *catalog)
 
void DetachSubtree (CatalogT *catalog)
 
void DetachSiblings (const PathString &current_tree)
 
void DetachAll ()
 
bool IsAttached (const PathString &root_path, CatalogT **attached_catalog) const
 
CatalogT * FindCatalog (const PathString &path) const
 
void ReadLock () const
 
void WriteLock () const
 
void Unlock () const
 
virtual void EnforceSqliteMemLimit ()
 
- Protected Member Functions inherited from SingleCopy
 SingleCopy ()
 

Private Member Functions

void CheckInodeWatermark ()
 
std::string PrintHierarchyRecursively (const CatalogT *catalog, const int level) const
 
std::string PrintMemStatsRecursively (const CatalogT *catalog) const
 
InodeRange AcquireInodes (uint64_t size)
 
void ReleaseInodes (const InodeRange chunk)
 

Private Attributes

CatalogList catalogs_
 
int inode_watermark_status_
 
uint64_t inode_gauge_
 
uint64_t revision_cache_
 
unsigned catalog_watermark_
 
bool volatile_flag_
 
bool has_authz_cache_
 
std::string authz_cache_
 
uint64_t incarnation_
 
InodeAnnotationinode_annotation_
 
pthread_rwlock_t * rwlock_
 
Statistics statistics_
 
pthread_key_t pkey_sqlitemem_
 
OwnerMap uid_map_
 
OwnerMap gid_map_
 

Detailed Description

template<class CatalogT>
class catalog::AbstractCatalogManager< CatalogT >

This class provides the read-only interface to a tree of catalogs representing a (subtree of a) repository. Mostly lookup functions filling DirectoryEntry objects. Reloading of expired catalogs, attaching of nested catalogs and delegating of lookups to the appropriate catalog is done transparently.

The loading / creating of catalogs is up to derived classes.

CatalogT is either Catalog or MockCatalog.

Usage: DerivedCatalogManager *catalog_manager = new DerivedCatalogManager(); catalog_manager->Init(); catalog_manager->Lookup(<inode>, &<result_entry>);

Definition at line 34 of file catalog.h.

Member Typedef Documentation

template<class CatalogT>
typedef CatalogT catalog::AbstractCatalogManager< CatalogT >::catalog_t

Definition at line 120 of file catalog_mgr.h.

template<class CatalogT>
typedef std::vector<CatalogT*> catalog::AbstractCatalogManager< CatalogT >::CatalogList

Definition at line 119 of file catalog_mgr.h.

Constructor & Destructor Documentation

template<class CatalogT >
catalog::AbstractCatalogManager< CatalogT >::AbstractCatalogManager ( perf::Statistics statistics)
explicit

Definition at line 28 of file catalog_mgr_impl.h.

Here is the call graph for this function:

template<class CatalogT >
catalog::AbstractCatalogManager< CatalogT >::~AbstractCatalogManager ( )
virtual

Definition at line 48 of file catalog_mgr_impl.h.

Member Function Documentation

template<class CatalogT >
InodeRange catalog::AbstractCatalogManager< CatalogT >::AcquireInodes ( uint64_t  size)
private

Assigns the next free numbers in the 64 bit space

Definition at line 726 of file catalog_mgr_impl.h.

template<class CatalogT>
virtual void catalog::AbstractCatalogManager< CatalogT >::ActivateCatalog ( CatalogT *  catalog)
inlineprotectedvirtual

Reimplemented in catalog::WritableCatalogManager, and catalog::ClientCatalogManager.

Definition at line 217 of file catalog_mgr.h.

template<class CatalogT>
bool catalog::AbstractCatalogManager< CatalogT >::AttachCatalog ( const std::string &  db_path,
CatalogT *  new_catalog 
)
protected

Attaches a newly created catalog.

Parameters
db_paththe file on a local file system containing the database
new_catalogthe catalog to attach to this CatalogManager
Returns
true on success, false otherwise

Definition at line 933 of file catalog_mgr_impl.h.

template<class CatalogT >
LoadError catalog::AbstractCatalogManager< CatalogT >::ChangeRoot ( const shash::Any root_hash)

Remounts to the given hash

Definition at line 156 of file catalog_mgr_impl.h.

Referenced by FuseRemounter::TryFinish().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT >
void catalog::AbstractCatalogManager< CatalogT >::CheckInodeWatermark ( )
private

Definition at line 77 of file catalog_mgr_impl.h.

template<class CatalogT>
virtual CatalogT* catalog::AbstractCatalogManager< CatalogT >::CreateCatalog ( const PathString mountpoint,
const shash::Any catalog_hash,
CatalogT *  parent_catalog 
)
protectedpure virtual

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.

Parameters
mountpointthe future mountpoint of the catalog to create
catalog_hashthe content hash of the catalog database
parent_catalogthe parent of the catalog to create
Returns
a newly created (derived) Catalog

Implemented in catalog::WritableCatalogManager, catalog::ClientCatalogManager, and catalog::SimpleCatalogManager.

template<class CatalogT>
void catalog::AbstractCatalogManager< CatalogT >::DetachAll ( )
inlineprotected

Definition at line 247 of file catalog_mgr.h.

template<class CatalogT>
void catalog::AbstractCatalogManager< CatalogT >::DetachCatalog ( CatalogT *  catalog)
protected

Removes a catalog from this CatalogManager, the catalog pointer is freed if the call succeeds. This method can create dangling children if a catalog in the middle of a tree is removed.

Parameters
catalogthe catalog to detach
Returns
true on success, false otherwise

Definition at line 984 of file catalog_mgr_impl.h.

Here is the call graph for this function:

template<class CatalogT >
void catalog::AbstractCatalogManager< CatalogT >::DetachNested ( )

Detaches everything except the root catalog

Definition at line 195 of file catalog_mgr_impl.h.

Referenced by TalkManager::MainResponder(), and quota::MainUnpinListener().

Here is the caller graph for this function:

template<class CatalogT >
void catalog::AbstractCatalogManager< CatalogT >::DetachSiblings ( const PathString current_tree)
protected

Detaches all nested catalogs that are not on a prefix of the given tree. Used when the catalog_watermark_ is surpassed.

Definition at line 1033 of file catalog_mgr_impl.h.

Here is the call graph for this function:

template<class CatalogT>
void catalog::AbstractCatalogManager< CatalogT >::DetachSubtree ( CatalogT *  catalog)
protected

Removes a catalog (and all of it's children) from this CatalogManager. The given catalog and all children are freed, if this call succeeds.

Parameters
catalogthe catalog to detach
Returns
true on success, false otherwise

Definition at line 1013 of file catalog_mgr_impl.h.

Referenced by catalog::AbstractCatalogManager< Catalog >::DetachAll().

Here is the caller graph for this function:

template<class CatalogT >
void catalog::AbstractCatalogManager< CatalogT >::EnforceSqliteMemLimit ( )
protectedvirtual

Reimplemented in catalog::WritableCatalogManager.

Definition at line 1114 of file catalog_mgr_impl.h.

template<class CatalogT >
CatalogT * catalog::AbstractCatalogManager< CatalogT >::FindCatalog ( const PathString path) const
protected

Find the catalog leaf in the tree that fits the path. The path might be served by a not yet loaded nested catalog.

Parameters
paththe path a catalog is searched for
Returns
the catalog which is best fitting at the given path

Definition at line 757 of file catalog_mgr_impl.h.

Referenced by catalog::WritableCatalogManager::FindCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT>
const std::vector<CatalogT*>& catalog::AbstractCatalogManager< CatalogT >::GetCatalogs ( ) const
inlineprotected

Definition at line 218 of file catalog_mgr.h.

Referenced by catalog::CatalogBalancer< CatalogMgrT >::Balance().

Here is the caller graph for this function:

template<class CatalogT >
shash::Any catalog::AbstractCatalogManager< CatalogT >::GetNestedCatalogHash ( const PathString mountpoint)

Returns the NULL hash if the nested catalog is not found.

Definition at line 219 of file catalog_mgr_impl.h.

Here is the call graph for this function:

template<class CatalogT >
int catalog::AbstractCatalogManager< CatalogT >::GetNumCatalogs ( ) const

Definition at line 702 of file catalog_mgr_impl.h.

Referenced by NClgMagicXattr::PrepareValueFenced().

Here is the caller graph for this function:

template<class CatalogT >
uint64_t catalog::AbstractCatalogManager< CatalogT >::GetRevision ( ) const
template<class CatalogT>
CatalogT* catalog::AbstractCatalogManager< CatalogT >::GetRootCatalog ( ) const
inline
template<class CatalogT>
inode_t catalog::AbstractCatalogManager< CatalogT >::GetRootInode ( ) const
inline

Get the inode number of the root DirectoryEntry ('root' means the root of the whole file system)

Returns
the root inode number

Definition at line 188 of file catalog_mgr.h.

Referenced by cvmfs::cvmfs_lookup(), cvmfs::cvmfs_opendir(), cvmfs::GetDirentForInode(), cvmfs::GetPathForInode(), LibContext::ListDirectory(), and catalog::AbstractCatalogManager< Catalog >::MangleInode().

Here is the caller graph for this function:

template<class CatalogT >
uint64_t catalog::AbstractCatalogManager< CatalogT >::GetTTL ( ) const

Definition at line 693 of file catalog_mgr_impl.h.

Referenced by MountPoint::GetEffectiveTtlSec(), and swissknife::CommandSync::Main().

Here is the caller graph for this function:

template<class CatalogT >
bool catalog::AbstractCatalogManager< CatalogT >::GetVOMSAuthz ( std::string *  authz) const

Definition at line 673 of file catalog_mgr_impl.h.

Referenced by MountPoint::ReEvaluateAuthz().

Here is the caller graph for this function:

template<class CatalogT >
bool catalog::AbstractCatalogManager< CatalogT >::HasExplicitTTL ( ) const

Definition at line 684 of file catalog_mgr_impl.h.

Referenced by swissknife::CommandSync::Main().

Here is the caller graph for this function:

template<class CatalogT >
bool catalog::AbstractCatalogManager< CatalogT >::Init ( )
virtual

Initializes the CatalogManager and loads and attaches the root entry.

Returns
true on successful init, otherwise false

Definition at line 98 of file catalog_mgr_impl.h.

Referenced by publish::ConstructSyncManagers(), MountPoint::CreateCatalogManager(), publish::GetSimpleCatalogManager(), swissknife::Ingest::Main(), swissknife::CommandApplyDirtab::Main(), and swissknife::CommandSync::Main().

Here is the caller graph for this function:

template<class CatalogT>
uint64_t catalog::AbstractCatalogManager< CatalogT >::inode_gauge ( )
inline

Definition at line 171 of file catalog_mgr.h.

Referenced by InodeMaxMagicXattr::GetValue(), and SaveState().

Here is the caller graph for this function:

template<class CatalogT>
bool catalog::AbstractCatalogManager< CatalogT >::IsAttached ( const PathString root_path,
CatalogT **  attached_catalog 
) const
protected

Checks if a searched catalog is already mounted to this CatalogManager

Parameters
root_paththe root path of the searched catalog
attached_catalogis set to the searched catalog, if not NULL
Returns
true if catalog is already present, false otherwise

Definition at line 782 of file catalog_mgr_impl.h.

template<class CatalogT >
bool catalog::AbstractCatalogManager< CatalogT >::ListCatalogSkein ( const PathString path,
std::vector< PathString > *  result_list 
)

Create a listing of the parents, catalog, and children of the catalog that serves the specified path. If the path specified is a catalog mountpoint the catalog at that point is mounted and returned.

Parameters
paththe path to find in the catalogs
result_listthe list where the results will be added.
Returns
true if the list could be created, false if catalog fails to mount.

Definition at line 420 of file catalog_mgr_impl.h.

Referenced by LibContext::ListNestedCatalogs().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT >
bool catalog::AbstractCatalogManager< CatalogT >::ListFileChunks ( const PathString path,
const shash::Algorithms  interpret_hashes_as,
FileChunkList chunks 
)

Collect file chunks (if exist)

Parameters
paththe path of the directory to list
interpret_hashes_ashash of the directory entry (by convention the same than the chunk hashes)
Returns
true if listing succeeded otherwise false

Definition at line 595 of file catalog_mgr_impl.h.

Referenced by cvmfs::cvmfs_open(), LibContext::GetExtAttr(), LibContext::Open(), cvmfs::Pin(), ChunkListMagicXattr::PrepareValueFenced(), and ChunksMagicXattr::PrepareValueFenced().

Here is the caller graph for this function:

template<class CatalogT >
bool catalog::AbstractCatalogManager< CatalogT >::Listing ( const PathString path,
DirectoryEntryList listing,
const bool  expand_symlink 
)

Do a listing of the specified directory.

Parameters
paththe path of the directory to list
listingthe resulting DirectoryEntryList
Returns
true if listing succeeded otherwise false

Definition at line 519 of file catalog_mgr_impl.h.

Referenced by catalog::AbstractCatalogManager< Catalog >::Listing(), and catalog::VirtualCatalog::RemoveRecursively().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT>
bool catalog::AbstractCatalogManager< CatalogT >::Listing ( const PathString path,
DirectoryEntryList listing 
)
inline

Definition at line 152 of file catalog_mgr.h.

template<class CatalogT>
bool catalog::AbstractCatalogManager< CatalogT >::Listing ( const std::string &  path,
DirectoryEntryList listing 
)
inline

Definition at line 155 of file catalog_mgr.h.

template<class CatalogT >
bool catalog::AbstractCatalogManager< CatalogT >::ListingStat ( const PathString path,
StatEntryList listing 
)

Do a listing of the specified directory, return only struct stat values.

Parameters
paththe path of the directory to list
listingthe resulting StatEntryList
Returns
true if listing succeeded otherwise false

Definition at line 557 of file catalog_mgr_impl.h.

Referenced by cvmfs::cvmfs_opendir(), LibContext::ListDirectory(), and LibContext::ListDirectoryStat().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT>
virtual LoadError catalog::AbstractCatalogManager< CatalogT >::LoadCatalog ( const PathString mountpoint,
const shash::Any hash,
std::string *  catalog_path,
shash::Any catalog_hash 
)
protectedpure virtual

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.

Implemented in catalog::ClientCatalogManager, and catalog::SimpleCatalogManager.

template<class CatalogT >
CatalogT * catalog::AbstractCatalogManager< CatalogT >::LoadFreeCatalog ( const PathString mountpoint,
const shash::Any hash 
)
protected

Load a catalog file as a freestanding Catalog object. Loading of catalogs is implemented by derived classes.

Definition at line 908 of file catalog_mgr_impl.h.

Here is the call graph for this function:

template<class CatalogT >
catalog::Counters catalog::AbstractCatalogManager< CatalogT >::LookupCounters ( const PathString path,
std::string *  subcatalog_path 
)

Definition at line 626 of file catalog_mgr_impl.h.

Referenced by LibContext::GetNestedCatalogAttr(), and CatalogCountersMagicXattr::PrepareValueFenced().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT >
bool catalog::AbstractCatalogManager< CatalogT >::LookupNested ( const PathString path,
PathString mountpoint,
shash::Any hash,
uint64_t *  size 
)

Perform a lookup for Nested Catalog that serves this path. If the path specified is a catalog mountpoint the catalog at that point is mounted and returned.

Parameters
paththe path to find in the catalogs
mountpointthe path to the nested catalog found
hashthe hash of the nested catalog found
sizethe size of the nested catalog, 0 for root. Root is not a nested catalog in the database.
Returns
true if lookup succeeded otherwise false (available catalog failed to mount)

Definition at line 356 of file catalog_mgr_impl.h.

Referenced by LibContext::GetNestedCatalogAttr().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT >
bool catalog::AbstractCatalogManager< CatalogT >::LookupPath ( const PathString path,
const LookupOptions  options,
DirectoryEntry dirent 
)

Perform a lookup for a specific DirectoryEntry in the catalogs.

Parameters
paththe path to find in the catalogs
optionswhether to perform another lookup to get the parent entry, too
direntthe resulting DirectoryEntry, or special Negative entry Note: can be set to zero if the result is not important
Returns
true if lookup succeeded otherwise false

Definition at line 246 of file catalog_mgr_impl.h.

Referenced by catalog::CatalogBalancer< CatalogMgrT >::AddCatalogMarker(), cvmfs::cvmfs_getxattr(), cvmfs::cvmfs_open(), catalog::VirtualCatalog::EnsurePresence(), swissknife::CommandApplyDirtab::FilterCandidatesFromGlobResult(), cvmfs::GetDirentForInode(), LibContext::GetDirentForPath(), cvmfs::GetDirentForPath(), catalog::AbstractCatalogManager< Catalog >::LookupPath(), and catalog::VirtualCatalog::Remove().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT>
bool catalog::AbstractCatalogManager< CatalogT >::LookupPath ( const std::string &  path,
const LookupOptions  options,
DirectoryEntry entry 
)
inline

Definition at line 134 of file catalog_mgr.h.

template<class CatalogT >
bool catalog::AbstractCatalogManager< CatalogT >::LookupXattrs ( const PathString path,
XattrList xattrs 
)

Definition at line 481 of file catalog_mgr_impl.h.

Referenced by cvmfs::cvmfs_getxattr(), cvmfs::cvmfs_listxattr(), and LibContext::GetExtAttr().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT>
inode_t catalog::AbstractCatalogManager< CatalogT >::MangleInode ( const inode_t  inode) const
inline

Inodes are ambiquitous under some circumstances, to prevent problems they must be passed through this method first

Parameters
inodethe raw inode
Returns
the revised inode

Definition at line 199 of file catalog_mgr.h.

Referenced by cvmfs::cvmfs_forget(), cvmfs::cvmfs_getattr(), cvmfs::cvmfs_getxattr(), cvmfs::cvmfs_listxattr(), cvmfs::cvmfs_lookup(), cvmfs::cvmfs_open(), cvmfs::cvmfs_opendir(), cvmfs::cvmfs_read(), cvmfs::cvmfs_readdir(), cvmfs::cvmfs_readlink(), cvmfs::cvmfs_release(), cvmfs::cvmfs_releasedir(), and cvmfs::cvmfs_statfs().

Here is the caller graph for this function:

template<class CatalogT>
CatalogT * catalog::AbstractCatalogManager< CatalogT >::MountCatalog ( const PathString mountpoint,
const shash::Any hash,
CatalogT *  parent_catalog 
)
protected

Load a catalog file and attach it to the tree of Catalog objects. Loading of catalogs is implemented by derived classes.

Definition at line 866 of file catalog_mgr_impl.h.

Here is the call graph for this function:

template<class CatalogT>
bool catalog::AbstractCatalogManager< CatalogT >::MountSubtree ( const PathString path,
const CatalogT *  entry_point,
bool  is_listable,
CatalogT **  leaf_catalog 
)
protected

Recursively mounts all nested catalogs required to serve a path. If leaf_catalog is NULL, just indicate if it is necessary to load a nested catalog for the given path. The final leaf nested catalog is returned. The is_listable parameter is relevant if path is a nested catalog. Only if is_listable is true, the nested catalog will be used; otherwise the parent with the transation point is sufficient.

Definition at line 807 of file catalog_mgr_impl.h.

Here is the call graph for this function:

template<class CatalogT >
std::string catalog::AbstractCatalogManager< CatalogT >::PrintAllMemStatistics ( ) const

Statistics from all catalogs

Definition at line 1104 of file catalog_mgr_impl.h.

Referenced by TalkManager::MainResponder().

Here is the caller graph for this function:

template<class CatalogT >
string catalog::AbstractCatalogManager< CatalogT >::PrintHierarchy ( ) const

Gets a formatted tree of the currently attached catalogs

Definition at line 714 of file catalog_mgr_impl.h.

Referenced by TalkManager::MainResponder().

Here is the caller graph for this function:

template<class CatalogT>
string catalog::AbstractCatalogManager< CatalogT >::PrintHierarchyRecursively ( const CatalogT *  catalog,
const int  level 
) const
private

Formats the catalog hierarchy

Definition at line 1059 of file catalog_mgr_impl.h.

template<class CatalogT>
std::string catalog::AbstractCatalogManager< CatalogT >::PrintMemStatsRecursively ( const CatalogT *  catalog) const
private

Definition at line 1085 of file catalog_mgr_impl.h.

template<class CatalogT>
void catalog::AbstractCatalogManager< CatalogT >::ReadLock ( ) const
inlineprotected

Definition at line 253 of file catalog_mgr.h.

Referenced by catalog::AbstractCatalogManager< Catalog >::inode_gauge().

Here is the caller graph for this function:

template<class CatalogT >
void catalog::AbstractCatalogManager< CatalogT >::ReleaseInodes ( const InodeRange  chunk)
private

Called if a catalog is detached which renders the associated InodeChunk invalid.

Parameters
chunkthe InodeChunk to be freed

Definition at line 745 of file catalog_mgr_impl.h.

template<class CatalogT >
LoadError catalog::AbstractCatalogManager< CatalogT >::Remount ( const bool  dry_run)

Remounts the root catalog if necessary. If a newer root catalog exists, it is mounted and replaces the currently mounted tree (all existing catalogs are detached)

Definition at line 118 of file catalog_mgr_impl.h.

Referenced by LibContext::Remount(), and FuseRemounter::TryFinish().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT >
void catalog::AbstractCatalogManager< CatalogT >::SetCatalogWatermark ( unsigned  limit)

Definition at line 72 of file catalog_mgr_impl.h.

Referenced by MountPoint::CreateCatalogManager().

Here is the caller graph for this function:

template<class CatalogT >
void catalog::AbstractCatalogManager< CatalogT >::SetInodeAnnotation ( InodeAnnotation new_annotation)

Definition at line 56 of file catalog_mgr_impl.h.

Referenced by MountPoint::SetupInodeAnnotation().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT >
void catalog::AbstractCatalogManager< CatalogT >::SetOwnerMaps ( const OwnerMap uid_map,
const OwnerMap gid_map 
)

Definition at line 64 of file catalog_mgr_impl.h.

Referenced by MountPoint::SetupOwnerMaps().

Here is the caller graph for this function:

template<class CatalogT>
Statistics catalog::AbstractCatalogManager< CatalogT >::statistics ( ) const
inline

Definition at line 170 of file catalog_mgr.h.

template<class CatalogT>
virtual void catalog::AbstractCatalogManager< CatalogT >::UnloadCatalog ( const CatalogT *  catalog)
inlineprotectedvirtual

Reimplemented in catalog::ClientCatalogManager.

Definition at line 216 of file catalog_mgr.h.

template<class CatalogT>
void catalog::AbstractCatalogManager< CatalogT >::Unlock ( ) const
inlineprotected

Definition at line 261 of file catalog_mgr.h.

Referenced by catalog::AbstractCatalogManager< Catalog >::inode_gauge().

Here is the caller graph for this function:

template<class CatalogT>
bool catalog::AbstractCatalogManager< CatalogT >::volatile_flag ( ) const
inline

Definition at line 174 of file catalog_mgr.h.

Referenced by MountPoint::CreateCatalogManager(), cvmfs::cvmfs_open(), cvmfs::cvmfs_read(), and LHashMagicXattr::GetValue().

Here is the caller graph for this function:

template<class CatalogT>
void catalog::AbstractCatalogManager< CatalogT >::WriteLock ( ) const
inlineprotected

Definition at line 257 of file catalog_mgr.h.

Member Data Documentation

template<class CatalogT>
std::string catalog::AbstractCatalogManager< CatalogT >::authz_cache_
private

Saves the VOMS requirements when a root catalog is attached

Definition at line 295 of file catalog_mgr.h.

template<class CatalogT>
unsigned catalog::AbstractCatalogManager< CatalogT >::catalog_watermark_
private

Try to keep number of nested catalogs below the given limit. Zero means no limit. Surpassing the watermark on mounting a catalog triggers a DetachSiblings() call.

Definition at line 282 of file catalog_mgr.h.

Referenced by catalog::AbstractCatalogManager< CatalogT >::AbstractCatalogManager().

template<class CatalogT>
OwnerMap catalog::AbstractCatalogManager< CatalogT >::gid_map_
private

Definition at line 306 of file catalog_mgr.h.

template<class CatalogT>
bool catalog::AbstractCatalogManager< CatalogT >::has_authz_cache_
private

Saves the result of GetVOMSAuthz when a root catalog is attached

Definition at line 291 of file catalog_mgr.h.

Referenced by catalog::AbstractCatalogManager< CatalogT >::AbstractCatalogManager().

template<class CatalogT>
uint64_t catalog::AbstractCatalogManager< CatalogT >::incarnation_
private

Counts how often the inodes have been invalidated.

Definition at line 299 of file catalog_mgr.h.

Referenced by catalog::AbstractCatalogManager< CatalogT >::AbstractCatalogManager().

template<class CatalogT>
InodeAnnotation* catalog::AbstractCatalogManager< CatalogT >::inode_annotation_
private
template<class CatalogT>
uint64_t catalog::AbstractCatalogManager< CatalogT >::inode_gauge_
private
template<class CatalogT>
int catalog::AbstractCatalogManager< CatalogT >::inode_watermark_status_
private

0: OK, 1: > 32bit

Definition at line 274 of file catalog_mgr.h.

Referenced by catalog::AbstractCatalogManager< CatalogT >::AbstractCatalogManager().

template<class CatalogT>
const inode_t catalog::AbstractCatalogManager< CatalogT >::kInodeOffset = 255
static
template<class CatalogT>
pthread_key_t catalog::AbstractCatalogManager< CatalogT >::pkey_sqlitemem_
private
template<class CatalogT>
uint64_t catalog::AbstractCatalogManager< CatalogT >::revision_cache_
private
template<class CatalogT>
Statistics catalog::AbstractCatalogManager< CatalogT >::statistics_
private
template<class CatalogT>
OwnerMap catalog::AbstractCatalogManager< CatalogT >::uid_map_
private

Definition at line 305 of file catalog_mgr.h.

template<class CatalogT>
bool catalog::AbstractCatalogManager< CatalogT >::volatile_flag_
private

Not protected by a read lock because it can only change when the root catalog is exchanged (during big global lock of the file system).

Definition at line 287 of file catalog_mgr.h.

Referenced by catalog::AbstractCatalogManager< CatalogT >::AbstractCatalogManager(), and catalog::AbstractCatalogManager< Catalog >::volatile_flag().


The documentation for this class was generated from the following files: