![]() |
CernVM-FS
2.13.0
|
#include <catalog.h>
Classes | |
struct | NestedCatalog |
Public Types | |
typedef std::vector< shash::Any > | HashVector |
typedef std::vector < NestedCatalog > | NestedCatalogList |
Public Member Functions | |
Catalog (const PathString &mountpoint, const shash::Any &catalog_hash, Catalog *parent, const bool is_nested=false) | |
virtual | ~Catalog () |
bool | OpenDatabase (const std::string &db_path) |
bool | LookupPath (const PathString &path, DirectoryEntry *dirent) const |
bool | LookupRawSymlink (const PathString &path, LinkString *raw_symlink) const |
bool | LookupXattrsPath (const PathString &path, XattrList *xattrs) const |
bool | ListingPath (const PathString &path, DirectoryEntryList *listing, const bool expand_symlink=true) const |
bool | ListingPathStat (const PathString &path, StatEntryList *listing) const |
bool | AllChunksBegin () |
bool | AllChunksNext (shash::Any *hash, zlib::Algorithms *compression_alg) |
bool | AllChunksEnd () |
bool | ListPathChunks (const PathString &path, const shash::Algorithms interpret_hashes_as, FileChunkList *chunks) const |
CatalogList | GetChildren () const |
Catalog * | FindSubtree (const PathString &path) const |
Catalog * | FindChild (const PathString &mountpoint) const |
void | AddChild (Catalog *child) |
void | RemoveChild (Catalog *child) |
const HashVector & | GetReferencedObjects () const |
void | TakeDatabaseFileOwnership () |
void | DropDatabaseFileOwnership () |
bool | OwnsDatabaseFile () const |
uint64_t | GetTTL () const |
bool | HasExplicitTTL () const |
uint64_t | GetRevision () const |
bool | GetVOMSAuthz (std::string *authz) const |
uint64_t | GetLastModified () const |
uint64_t | GetNumEntries () const |
uint64_t | GetNumChunks () const |
shash::Any | GetPreviousRevision () const |
const Counters & | GetCounters () const |
std::string | PrintMemStatistics () const |
float | schema () const |
PathString | mountpoint () const |
Catalog * | parent () const |
uint64_t | max_row_id () const |
InodeRange | inode_range () const |
void | set_inode_range (const InodeRange value) |
std::string | database_path () const |
PathString | root_prefix () const |
shash::Any | hash () const |
bool | volatile_flag () const |
uint64_t | revision () const |
bool | IsInitialized () const |
bool | IsRoot () const |
bool | IsAutogenerated () const |
bool | HasParent () const |
virtual bool | IsWritable () const |
const NestedCatalogList & | ListNestedCatalogs () const |
const NestedCatalogList | ListOwnNestedCatalogs () const |
bool | FindNested (const PathString &mountpoint, shash::Any *hash, uint64_t *size) const |
void | SetInodeAnnotation (InodeAnnotation *new_annotation) |
inode_t | GetMangledInode (const uint64_t row_id, const uint64_t hardlink_group) const |
void | SetOwnerMaps (const OwnerMap *uid_map, const OwnerMap *gid_map) |
uint64_t | MapUid (const uint64_t uid) const |
uint64_t | MapGid (const uint64_t gid) const |
Static Public Member Functions | |
static Catalog * | AttachFreely (const std::string &imaginary_mountpoint, const std::string &file, const shash::Any &catalog_hash, Catalog *parent=NULL, const bool is_nested=false) |
Static Public Attributes | |
static const uint64_t | kDefaultTTL = 240 |
Protected Types | |
typedef std::map< uint64_t, inode_t > | HardlinkGroupMap |
Protected Member Functions | |
bool | InitStandalone (const std::string &database_file) |
bool | ReadCatalogCounters () |
virtual CatalogDatabase::OpenMode | DatabaseOpenMode () const |
virtual void | InitPreparedStatements () |
void | FinalizePreparedStatements () |
Counters & | GetWritableCounters () |
const CatalogDatabase & | database () const |
CatalogDatabase & | database () |
void | set_parent (Catalog *catalog) |
void | ResetNestedCatalogCacheUnprotected () |
bool | LookupMd5Path (const shash::Md5 &md5path, DirectoryEntry *dirent) const |
Protected Attributes | |
HardlinkGroupMap | hardlink_groups_ |
pthread_mutex_t * | lock_ |
Private Types | |
enum | VomsAuthzStatus { kVomsUnknown, kVomsNone, kVomsPresent } |
typedef std::map< PathString, Catalog * > | NestedCatalogMap |
Private Member Functions | |
FRIEND_TEST (T_Catalog, NormalizePath) | |
FRIEND_TEST (T_Catalog, PlantPath) | |
shash::Md5 | NormalizePath (const PathString &path) const |
PathString | NormalizePath2 (const PathString &path) const |
PathString | PlantPath (const PathString &path) const |
void | FixTransitionPoint (const shash::Md5 &md5path, DirectoryEntry *dirent) const |
bool | LookupXattrsMd5Path (const shash::Md5 &md5path, XattrList *xattrs) const |
bool | ListMd5PathChunks (const shash::Md5 &md5path, const shash::Algorithms interpret_hashes_as, FileChunkList *chunks) const |
bool | ListingMd5Path (const shash::Md5 &md5path, DirectoryEntryList *listing, const bool expand_symlink=true) const |
bool | ListingMd5PathStat (const shash::Md5 &md5path, StatEntryList *listing) const |
bool | LookupEntry (const shash::Md5 &md5path, const bool expand_symlink, DirectoryEntry *dirent) const |
![]() | |
SingleCopy () | |
Static Private Attributes | |
static const shash::Md5 | kMd5PathEmpty |
Friends | |
class | swissknife::CommandMigrate |
This class wraps a catalog database and provides methods to query for directory entries. It has a pointer to its parent catalog and its children, thereby creating a tree structure of nested catalogs.
Read-only catalog. A sub-class provides read-write access.
|
protected |
typedef std::vector<shash::Any> catalog::Catalog::HashVector |
typedef std::vector<NestedCatalog> catalog::Catalog::NestedCatalogList |
|
private |
|
private |
catalog::Catalog::Catalog | ( | const PathString & | mountpoint, |
const shash::Any & | catalog_hash, | ||
Catalog * | parent, | ||
const bool | is_nested = false |
||
) |
Note: is_nested only has an effect if parent == NULL otherwise being a root catalog is determined by having a parent pointer or not.
Definition at line 48 of file catalog.cc.
|
virtual |
void catalog::Catalog::AddChild | ( | Catalog * | child | ) |
Add a Catalog as child to this Catalog.
child | the Catalog to define as child |
Definition at line 719 of file catalog.cc.
Referenced by catalog::WritableCatalog::InsertNestedCatalog(), and OpenDatabase().
bool catalog::Catalog::AllChunksBegin | ( | ) |
Definition at line 412 of file catalog.cc.
Referenced by swissknife::CommandPull::Pull().
bool catalog::Catalog::AllChunksEnd | ( | ) |
Definition at line 421 of file catalog.cc.
Referenced by swissknife::CommandPull::Pull().
bool catalog::Catalog::AllChunksNext | ( | shash::Any * | hash, |
zlib::Algorithms * | compression_alg | ||
) |
Definition at line 415 of file catalog.cc.
Referenced by swissknife::CommandPull::Pull().
|
static |
Open a catalog outside the framework of a catalog manager.
Definition at line 29 of file catalog.cc.
Referenced by swissknife::CommandCheck::FetchCatalog(), swissknife::Assistant::GetCatalog(), swissknife::CommandTag::GetCatalog(), and swissknife::CommandPull::Pull().
|
inlineprotected |
Definition at line 249 of file catalog.h.
Referenced by swissknife::CommandMigrate::MigrationWorker_20x::AnalyzeFileLinkcounts(), swissknife::CommandMigrate::MigrationWorker_20x::AttachOldCatalogDatabase(), swissknife::CommandMigrate::MigrationWorker_20x::CheckDatabaseSchemaCompatibility(), swissknife::CommandMigrate::MigrationWorker_217::CheckDatabaseSchemaCompatibility(), swissknife::CommandMigrate::HardlinkRemovalMigrationWorker::CheckDatabaseSchemaCompatibility(), swissknife::CommandMigrate::BulkhashRemovalMigrationWorker::CheckDatabaseSchemaCompatibility(), swissknife::CommandMigrate::StatsMigrationWorker::CheckDatabaseSchemaCompatibility(), swissknife::CommandMigrate::AbstractMigrationWorker< DerivedT >::CollectAndAggregateStatistics(), catalog::WritableCatalog::Commit(), catalog::WritableCatalog::CopyToParent(), swissknife::CommandMigrate::MigrationWorker_20x::DetachOldCatalogDatabase(), swissknife::CommandMigrate::MigrationWorker_20x::FindRootEntryInformation(), swissknife::CommandMigrate::MigrationWorker_20x::FixNestedCatalogTransitionPoints(), swissknife::CommandMigrate::MigrationWorker_20x::GenerateCatalogStatistics(), GetLastModified(), GetNumEntries(), GetPreviousRevision(), GetReferencedObjects(), GetRevision(), GetTTL(), GetVOMSAuthz(), swissknife::CommandMigrate::PendingCatalog::HasChanges(), HasExplicitTTL(), catalog::WritableCatalog::InitPreparedStatements(), InitPreparedStatements(), catalog::WritableCatalog::InsertBindMountpoint(), catalog::WritableCatalog::InsertNestedCatalog(), swissknife::CommandMigrate::MigrationWorker_20x::MigrateFileMetadata(), swissknife::CommandMigrate::MigrationWorker_20x::MigrateNestedCatalogMountPoints(), OpenDatabase(), PrintMemStatistics(), ReadCatalogCounters(), catalog::WritableCatalog::RemoveBindMountpoint(), swissknife::CommandMigrate::MigrationWorker_20x::RemoveDanglingNestedMountpoints(), catalog::WritableCatalog::RemoveNestedCatalog(), schema(), catalog::WritableCatalog::SetBranch(), catalog::WritableCatalog::SetPreviousRevision(), catalog::WritableCatalog::SetRevision(), catalog::WritableCatalog::SetTTL(), catalog::WritableCatalog::SetVOMSAuthz(), catalog::WritableCatalog::Transaction(), catalog::WritableCatalog::UpdateCounters(), catalog::WritableCatalog::UpdateLastModified(), catalog::WritableCatalog::UpdateNestedCatalog(), swissknife::CommandMigrate::AbstractMigrationWorker< DerivedT >::UpdateNestedCatalogReferences(), and catalog::WritableCatalog::VacuumDatabaseIfNecessary().
|
inlineprotected |
|
inline |
Definition at line 180 of file catalog.h.
Referenced by swissknife::CommandFileStats::CatalogCallback(), catalog::WritableCatalog::CopyToParent(), catalog::WritableCatalogManager::FinalizeCatalog(), swissknife::CommandMigrate::MigrationCallback(), catalog::WritableCatalogManager::RemoveNestedCatalog(), and catalog::WritableCatalogManager::ScheduleCatalogProcessing().
|
inlineprotectedvirtual |
Specifies the SQLite open flags. Overwritten by r/w catalog.
Reimplemented in catalog::WritableCatalog.
Definition at line 240 of file catalog.h.
Referenced by OpenDatabase().
void catalog::Catalog::DropDatabaseFileOwnership | ( | ) |
|
protected |
Definition at line 108 of file catalog.cc.
Referenced by ~Catalog().
Catalog * catalog::Catalog::FindChild | ( | const PathString & | mountpoint | ) | const |
Looks for a child catalog, which is a subset of all registered nested catalogs.
Definition at line 798 of file catalog.cc.
Referenced by AddChild(), catalog::WritableCatalog::CopyCatalogsToParent(), FindSubtree(), RemoveChild(), catalog::WritableCatalog::RemoveNestedCatalog(), and catalog::WritableCatalogManager::SwapNestedCatalog().
bool catalog::Catalog::FindNested | ( | const PathString & | mountpoint, |
shash::Any * | hash, | ||
uint64_t * | size | ||
) | const |
Looks for a specific registered nested catalog based on a path.
Definition at line 680 of file catalog.cc.
Referenced by catalog::WritableCatalogManager::FinalizeCatalog(), swissknife::CommandCheck::Find(), swissknife::CommandCheck::FindSubtreeRootCatalog(), catalog::WritableCatalog::MoveCatalogsToNested(), catalog::WritableCatalog::RemoveBindMountpoint(), catalog::WritableCatalog::RemoveNestedCatalog(), catalog::WritableCatalogManager::SwapNestedCatalog(), and catalog::WritableCatalogManager::TouchDirectory().
Catalog * catalog::Catalog::FindSubtree | ( | const PathString & | path | ) | const |
Find the nested catalog that serves the given path. It might be possible that the path is in fact served by a child of the found nested catalog.
path | the path to find a best fitting catalog for |
Definition at line 763 of file catalog.cc.
|
private |
For the transition points for nested catalogs and bind mountpoints, the inode is ambiguous. It has to be set to the parent inode because nested catalogs are lazily loaded.
md5path | the MD5 hash of the entry to check |
dirent | the DirectoryEntry to perform coherence fixes on |
Definition at line 817 of file catalog.cc.
Referenced by ListingMd5Path(), ListingMd5PathStat(), and LookupEntry().
|
private |
|
private |
CatalogList catalog::Catalog::GetChildren | ( | ) | const |
Definition at line 741 of file catalog.cc.
Referenced by swissknife::CommandMigrate::ConvertCatalogsRecursively(), catalog::WritableCatalogManager::GetModifiedCatalogLeafsRecursively(), and catalog::WritableCatalogManager::GetModifiedCatalogsRecursively().
|
inline |
Definition at line 171 of file catalog.h.
Referenced by catalog::WritableCatalogManager::CreateNestedCatalog(), catalog::WritableCatalogManager::FinalizeCatalog(), RepoCountersMagicXattr::PrepareValueFenced(), catalog::WritableCatalog::RemoveFromParent(), catalog::WritableCatalogManager::SwapNestedCatalog(), and catalog::ClientCatalogManager::UnloadCatalog().
uint64_t catalog::Catalog::GetLastModified | ( | ) | const |
Definition at line 522 of file catalog.cc.
Referenced by swissknife::CommandEditTag::AddNewTag(), swissknife::CommandMigrate::DoMigrationAndCommit(), and swissknife::CommandPull::Pull().
inode_t catalog::Catalog::GetMangledInode | ( | const uint64_t | row_id, |
const uint64_t | hardlink_group | ||
) | const |
Determine the actual inode of a DirectoryEntry. The first used entry from a hardlink group deterimines the inode of the others.
row_id | the row id of a read row in the sqlite database |
hardlink_group | the id of a possibly present hardlink group |
Definition at line 583 of file catalog.cc.
Referenced by catalog::SqlLookup::GetDirent().
uint64_t catalog::Catalog::GetNumChunks | ( | ) | const |
Definition at line 530 of file catalog.cc.
Referenced by swissknife::CommandPull::Pull().
uint64_t catalog::Catalog::GetNumEntries | ( | ) | const |
Definition at line 535 of file catalog.cc.
Referenced by swissknife::CommandListCatalogs::CatalogCallback(), and catalog::WritableCatalogManager::FixWeight().
shash::Any catalog::Catalog::GetPreviousRevision | ( | ) | const |
Definition at line 544 of file catalog.cc.
Referenced by swissknife::CommandPull::PullRecursion().
const Catalog::HashVector & catalog::Catalog::GetReferencedObjects | ( | ) | const |
Only used by the garbage collection
Definition at line 449 of file catalog.cc.
Referenced by swissknife::CommandListReflog::CatalogCallback().
uint64_t catalog::Catalog::GetRevision | ( | ) | const |
Definition at line 517 of file catalog.cc.
Referenced by swissknife::CommandEditTag::AddNewTag(), catalog::WritableCatalogManager::CatalogUploadCallback(), catalog::WritableCatalogManager::Commit(), swissknife::CommandMigrate::DoMigrationAndCommit(), catalog::WritableCatalog::IncrementRevision(), and revision().
uint64_t catalog::Catalog::GetTTL | ( | ) | const |
Definition at line 480 of file catalog.cc.
Referenced by catalog::WritableCatalogManager::CatalogUploadCallback(), and swissknife::CommandMigrate::DoMigrationAndCommit().
bool catalog::Catalog::GetVOMSAuthz | ( | std::string * | authz | ) | const |
|
inlineprotected |
Definition at line 247 of file catalog.h.
Referenced by catalog::WritableCatalog::MergeIntoParent().
bool catalog::Catalog::HasExplicitTTL | ( | ) | const |
|
inline |
Definition at line 182 of file catalog.h.
Referenced by swissknife::CommandListReflog::CatalogCallback(), catalog::WritableCatalog::CopyCatalogsToParent(), swissknife::CommandMigrate::PendingCatalog::GetOldContentHash(), and swissknife::CommandMigrate::AbstractMigrationWorker< DerivedT >::UpdateCatalogMetadata().
|
inline |
Definition at line 196 of file catalog.h.
Referenced by catalog::WritableCatalogManager::CatalogUploadCallback(), FixTransitionPoint(), catalog::WritableCatalog::MergeIntoParent(), OpenDatabase(), and catalog::WritableCatalog::RemoveFromParent().
|
protectedvirtual |
InitPreparedStatement uses polymorphism in case of a r/w catalog. FinalizePreparedStatements is called in the destructor where polymorphism does not work any more and has to be called both in the WritableCatalog and the Catalog destructor
Reimplemented in catalog::WritableCatalog.
Definition at line 96 of file catalog.cc.
Referenced by catalog::WritableCatalog::InitPreparedStatements(), and OpenDatabase().
|
protected |
Definition at line 120 of file catalog.cc.
Referenced by catalog::WritableCatalog::AttachFreely(), and AttachFreely().
|
inline |
Definition at line 178 of file catalog.h.
Referenced by InitStandalone().
|
inline |
Definition at line 190 of file catalog.h.
Referenced by catalog::WritableCatalogManager::FixWeight().
|
inline |
Definition at line 186 of file catalog.h.
Referenced by GetMangledInode(), IsAutogenerated(), ListingMd5Path(), ListingMd5PathStat(), ListMd5PathChunks(), LookupEntry(), and LookupXattrsMd5Path().
|
inline |
Definition at line 189 of file catalog.h.
Referenced by catalog::ClientCatalogManager::ActivateCatalog(), catalog::WritableCatalogManager::CatalogUploadCallback(), catalog::WritableCatalogManager::FinalizeCatalog(), catalog::WritableCatalogManager::FixWeight(), swissknife::CommandMigrate::PendingCatalog::IsRoot(), catalog::WritableCatalog::MergeIntoParent(), catalog::VirtualCatalog::Remove(), catalog::WritableCatalog::RemoveFromParent(), catalog::WritableCatalogManager::RemoveNestedCatalog(), and catalog::WritableCatalog::VacuumDatabaseIfNecessary().
|
inlinevirtual |
Reimplemented in catalog::WritableCatalog.
Definition at line 197 of file catalog.h.
Referenced by catalog::WritableCatalogManager::CreateNestedCatalog(), catalog::WritableCatalogManager::FindCatalog(), and catalog::WritableCatalog::GetWritableParent().
|
private |
Perform a listing of the directory with the given MD5 path hash. Returns only struct stat values
path_hash | the MD5 hash of the path of the directory to list |
listing | will be set to the resulting DirectoryEntryList |
expand_symlink | defines if magic symlinks should be resolved |
Definition at line 393 of file catalog.cc.
Referenced by ListingPath().
|
private |
Perform a listing of the directory with the given MD5 path hash.
path_hash | the MD5 hash of the path of the directory to list |
listing | will be set to the resulting DirectoryEntryList |
Definition at line 361 of file catalog.cc.
Referenced by ListingPathStat().
|
inline |
Definition at line 132 of file catalog.h.
Referenced by swissknife::CommandCheck::Find(), and catalog::WritableCatalog::MoveToNestedRecursively().
|
inline |
|
private |
Hash algorithm is given by the unchunked file. Could be figured out by a join but it is faster if the user of this method tells us.
Definition at line 429 of file catalog.cc.
Referenced by ListPathChunks().
const Catalog::NestedCatalogList & catalog::Catalog::ListNestedCatalogs | ( | ) | const |
Get a list of all registered nested catalogs and bind mountpoints in this catalog.
Definition at line 620 of file catalog.cc.
Referenced by catalog::VirtualCatalog::GetSortedTagsFromCatalog(), and swissknife::CommandMigrate::MigrationWorker_20x::RemoveDanglingNestedMountpoints().
const Catalog::NestedCatalogList catalog::Catalog::ListOwnNestedCatalogs | ( | ) | const |
Get a list of all registered nested catalogs without bind mountpoints. Used for replication and garbage collection.
Definition at line 646 of file catalog.cc.
Referenced by catalog::WritableCatalog::CopyCatalogsToParent(), and swissknife::CommandPull::PullRecursion().
|
inline |
Definition at line 144 of file catalog.h.
Referenced by swissknife::CommandCheck::Find(), and catalog::WritableCatalog::MoveFileChunksToNested().
|
private |
Performs a lookup on this Catalog for a given MD5 path hash.
md5path | the MD5 hash of the searched path |
expand_symlink | indicates if variables in symlink should be resolved |
dirent | will be set to the found DirectoryEntry |
Definition at line 300 of file catalog.cc.
Referenced by LookupMd5Path(), and LookupRawSymlink().
|
protected |
Performs a lookup on this Catalog for a given MD5 path hash.
md5path | the MD5 hash of the searched path |
dirent | will be set to the found DirectoryEntry |
Definition at line 323 of file catalog.cc.
Referenced by FixTransitionPoint(), LookupPath(), and catalog::WritableCatalog::TouchEntry().
|
inline |
Definition at line 124 of file catalog.h.
Referenced by catalog::WritableCatalog::CopyToParent(), catalog::VirtualCatalog::CreateBaseDirectory(), swissknife::CommandCheck::Find(), catalog::WritableCatalogManager::FindCatalog(), FixTransitionPoint(), catalog::WritableCatalogManager::GraftNestedCatalog(), IsAutogenerated(), catalog::WritableCatalog::MakeNestedRoot(), catalog::WritableCatalog::MakeTransitionPoint(), catalog::WritableCatalog::RemoveEntry(), and catalog::WritableCatalogManager::TouchDirectory().
bool catalog::Catalog::LookupRawSymlink | ( | const PathString & | path, |
LinkString * | raw_symlink | ||
) | const |
|
private |
Definition at line 339 of file catalog.cc.
Referenced by LookupXattrsPath().
|
inline |
Definition at line 128 of file catalog.h.
Referenced by catalog::WritableCatalogManager::CreateNestedCatalog(), and catalog::WritableCatalog::MoveToNestedRecursively().
|
inline |
Definition at line 221 of file catalog.h.
Referenced by catalog::SqlLookup::GetDirent().
|
inline |
Definition at line 215 of file catalog.h.
Referenced by catalog::SqlLookup::GetDirent().
|
inline |
Definition at line 175 of file catalog.h.
Referenced by AddChild(), swissknife::CommandMigrate::ChownMigrationWorker::ApplyPersonaMappings(), swissknife::CommandListReflog::CatalogCallback(), swissknife::CommandListCatalogs::CatalogCallback(), swissknife::CommandMigrate::CatalogCallback(), catalog::WritableCatalogManager::CatalogUploadCallback(), catalog::WritableCatalog::Commit(), catalog::WritableCatalog::CopyToParent(), catalog::WritableCatalogManager::CreateNestedCatalog(), catalog::WritableCatalogManager::FinalizeCatalog(), swissknife::CommandCheck::Find(), catalog::WritableCatalogManager::FixWeight(), ListNestedCatalogs(), catalog::WritableCatalog::MakeNestedRoot(), catalog::WritableCatalog::MergeIntoParent(), catalog::WritableCatalog::Partition(), PrintMemStatistics(), RemoveChild(), catalog::WritableCatalog::RemoveFromParent(), catalog::WritableCatalogManager::RemoveNestedCatalog(), swissknife::CommandMigrate::PendingCatalog::root_path(), catalog::WritableCatalog::Transaction(), catalog::ClientCatalogManager::UnloadCatalog(), and catalog::WritableCatalog::VacuumDatabaseIfNecessary().
|
private |
Removes the mountpoint and prepends the root prefix to path
Definition at line 238 of file catalog.cc.
Referenced by ListingPath(), ListingPathStat(), ListPathChunks(), LookupPath(), LookupRawSymlink(), and LookupXattrsPath().
|
private |
Same as NormalizePath but returns a PathString instead of an Md5 hash.
Definition at line 264 of file catalog.cc.
Referenced by FindNested().
bool catalog::Catalog::OpenDatabase | ( | const std::string & | db_path | ) |
Establishes the database structures and opens the sqlite database file.
db_path | the absolute path to the database file on local file system |
Definition at line 161 of file catalog.cc.
Referenced by InitStandalone().
|
inline |
|
inline |
Definition at line 176 of file catalog.h.
Referenced by catalog::WritableCatalogManager::AddDirectory(), catalog::WritableCatalog::CopyCatalogsToParent(), catalog::WritableCatalog::CopyToParent(), catalog::WritableCatalogManager::FinalizeCatalog(), catalog::WritableCatalog::GetWritableParent(), catalog::WritableCatalogManager::GraftNestedCatalog(), catalog::WritableCatalog::MergeIntoParent(), catalog::WritableCatalogManager::RemoveDirectory(), and catalog::WritableCatalog::RemoveFromParent().
|
private |
The opposite of NormalizePath: from a full path remove the root prefix and add the catalogs current mountpoint. Needed for normalized paths from the SQlite tables, such as nested catalog entry points.
Definition at line 281 of file catalog.cc.
Referenced by ListNestedCatalogs(), and ListOwnNestedCatalogs().
string catalog::Catalog::PrintMemStatistics | ( | ) | const |
|
protected |
Definition at line 133 of file catalog.cc.
Referenced by OpenDatabase(), and catalog::WritableCatalog::UpdateCounters().
void catalog::Catalog::RemoveChild | ( | Catalog * | child | ) |
Removes a Catalog from the children list of this Catalog
child | the Catalog to delete as child |
Definition at line 732 of file catalog.cc.
Referenced by catalog::WritableCatalog::RemoveNestedCatalog().
|
protected |
Drops the nested catalog cache. Usually this is only useful in subclasses that implement writable catalogs.
Note: this action is not secured by the catalog's mutex. If serialisation is required the subclass needs to ensure that.
Definition at line 671 of file catalog.cc.
Referenced by catalog::WritableCatalog::InsertNestedCatalog(), catalog::WritableCatalog::RemoveNestedCatalog(), and catalog::WritableCatalog::UpdateNestedCatalog().
|
inline |
|
inline |
Definition at line 181 of file catalog.h.
Referenced by swissknife::CommandEditTag::AddNewTag(), and OpenDatabase().
|
inline |
Definition at line 174 of file catalog.h.
Referenced by catalog::SqlLookup::GetDirent().
|
inline |
Definition at line 179 of file catalog.h.
Referenced by InitStandalone().
|
inlineprotected |
Definition at line 251 of file catalog.h.
Referenced by AddChild(), and RemoveChild().
void catalog::Catalog::SetInodeAnnotation | ( | InodeAnnotation * | new_annotation | ) |
Sets a new object to do inode annotations (or set to NULL) The annotation object is not owned by the catalog.
Definition at line 700 of file catalog.cc.
Definition at line 709 of file catalog.cc.
void catalog::Catalog::TakeDatabaseFileOwnership | ( | ) |
Definition at line 464 of file catalog.cc.
Referenced by catalog::WritableCatalogManager::ActivateCatalog(), catalog::SimpleCatalogManager::CreateCatalog(), and swissknife::Assistant::GetCatalog().
|
friend |
|
private |
|
private |
Definition at line 312 of file catalog.h.
Referenced by AddChild(), FindChild(), GetChildren(), and RemoveChild().
|
private |
Definition at line 323 of file catalog.h.
Referenced by GetCounters(), GetNumChunks(), GetWritableCounters(), and ReadCatalogCounters().
|
private |
Definition at line 291 of file catalog.h.
Referenced by Catalog(), database(), database_path(), DropDatabaseFileOwnership(), OpenDatabase(), OwnsDatabaseFile(), ReadCatalogCounters(), TakeDatabaseFileOwnership(), and ~Catalog().
|
private |
Definition at line 326 of file catalog.h.
Referenced by Catalog(), MapGid(), and SetOwnerMaps().
|
mutableprotected |
Definition at line 230 of file catalog.h.
Referenced by GetMangledInode().
|
private |
Definition at line 319 of file catalog.h.
Referenced by IsInitialized(), and OpenDatabase().
|
private |
Definition at line 322 of file catalog.h.
Referenced by Catalog(), GetMangledInode(), and SetInodeAnnotation().
|
private |
Definition at line 320 of file catalog.h.
Referenced by GetMangledInode(), inode_range(), IsInitialized(), and set_inode_range().
|
private |
True, iff root_prefix_ == mountpoint_
Definition at line 303 of file catalog.h.
Referenced by NormalizePath(), NormalizePath2(), OpenDatabase(), and PlantPath().
|
private |
|
static |
The default TTL should be shorter than the autofs idle unmount time which is 5 minutes, because the config repo is accessed on every root catalog refresh and we want to avoid thrashing that mountpoint.4 minutes default TTL
Definition at line 104 of file catalog.h.
Referenced by GetTTL(), and swissknife::CommandSync::Main().
|
staticprivate |
The hash of the empty string. Used to identify the root entry of a repository, which is the child transition point of a bind mountpoint.
Definition at line 264 of file catalog.h.
Referenced by FixTransitionPoint().
|
protected |
Definition at line 232 of file catalog.h.
Referenced by AddChild(), Catalog(), FindChild(), FindNested(), GetChildren(), GetNumEntries(), GetPreviousRevision(), GetRevision(), GetTTL(), GetVOMSAuthz(), HasExplicitTTL(), ListingMd5Path(), ListingMd5PathStat(), ListMd5PathChunks(), ListNestedCatalogs(), ListOwnNestedCatalogs(), LookupEntry(), LookupXattrsMd5Path(), PrintMemStatistics(), RemoveChild(), SetInodeAnnotation(), catalog::WritableCatalog::UpdateNestedCatalog(), and ~Catalog().
|
private |
Definition at line 309 of file catalog.h.
Referenced by DropDatabaseFileOwnership(), OpenDatabase(), OwnsDatabaseFile(), and TakeDatabaseFileOwnership().
|
private |
Definition at line 321 of file catalog.h.
Referenced by Catalog(), max_row_id(), and OpenDatabase().
|
private |
Normally, catalogs are mounted at their root_prefix_. But for the structure under /.cvmfs/snapshots/..., that's not the case.
Definition at line 299 of file catalog.h.
Referenced by FindSubtree(), FixTransitionPoint(), IsAutogenerated(), mountpoint(), NormalizePath(), NormalizePath2(), OpenDatabase(), and PlantPath().
|
mutableprivate |
Definition at line 313 of file catalog.h.
Referenced by ListNestedCatalogs(), and ResetNestedCatalogCacheUnprotected().
|
mutableprivate |
Definition at line 314 of file catalog.h.
Referenced by ListNestedCatalogs(), and ResetNestedCatalogCacheUnprotected().
|
private |
Definition at line 311 of file catalog.h.
Referenced by FixTransitionPoint(), HasParent(), OpenDatabase(), parent(), and set_parent().
|
mutableprivate |
Definition at line 337 of file catalog.h.
Referenced by GetReferencedObjects().
|
private |
Definition at line 294 of file catalog.h.
Referenced by NormalizePath(), NormalizePath2(), OpenDatabase(), PlantPath(), and root_prefix().
|
private |
Definition at line 333 of file catalog.h.
Referenced by AllChunksBegin(), AllChunksEnd(), AllChunksNext(), Catalog(), FinalizePreparedStatements(), and InitPreparedStatements().
|
private |
Definition at line 334 of file catalog.h.
Referenced by Catalog(), FinalizePreparedStatements(), InitPreparedStatements(), and ListMd5PathChunks().
|
private |
Definition at line 331 of file catalog.h.
Referenced by Catalog(), FinalizePreparedStatements(), InitPreparedStatements(), and ListNestedCatalogs().
|
private |
Definition at line 328 of file catalog.h.
Referenced by Catalog(), FinalizePreparedStatements(), InitPreparedStatements(), ListingMd5Path(), and ListingMd5PathStat().
|
private |
Definition at line 329 of file catalog.h.
Referenced by Catalog(), FinalizePreparedStatements(), InitPreparedStatements(), and LookupEntry().
|
private |
Definition at line 330 of file catalog.h.
Referenced by Catalog(), FinalizePreparedStatements(), FindNested(), and InitPreparedStatements().
|
private |
Definition at line 335 of file catalog.h.
Referenced by Catalog(), FinalizePreparedStatements(), InitPreparedStatements(), and LookupXattrsMd5Path().
|
private |
Definition at line 332 of file catalog.h.
Referenced by Catalog(), FinalizePreparedStatements(), InitPreparedStatements(), and ListOwnNestedCatalogs().
|
private |
Definition at line 325 of file catalog.h.
Referenced by Catalog(), MapUid(), and SetOwnerMaps().
|
private |
Definition at line 304 of file catalog.h.
Referenced by OpenDatabase(), and volatile_flag().
|
mutableprivate |
Definition at line 317 of file catalog.h.
Referenced by GetVOMSAuthz().
|
mutableprivate |
Definition at line 316 of file catalog.h.
Referenced by GetVOMSAuthz().