CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
catalog::DirectoryEntry Class Reference

#include <directory_entry.h>

Inheritance diagram for catalog::DirectoryEntry:
Collaboration diagram for catalog::DirectoryEntry:

Public Member Functions

 DirectoryEntry (const DirectoryEntryBase &base)
 
 DirectoryEntry ()
 
 DirectoryEntry (SpecialDirents special_type)
 
SpecialDirents GetSpecial () const
 
Differences CompareTo (const DirectoryEntry &other) const
 
bool operator== (const DirectoryEntry &other) const
 
bool operator!= (const DirectoryEntry &other) const
 
bool IsNegative () const
 
bool IsNestedCatalogRoot () const
 
bool IsNestedCatalogMountpoint () const
 
bool IsBindMountpoint () const
 
bool IsChunkedFile () const
 
bool IsHidden () const
 
uint32_t hardlink_group () const
 
void set_hardlink_group (const uint32_t group)
 
void set_is_nested_catalog_mountpoint (const bool val)
 
void set_is_nested_catalog_root (const bool val)
 
void set_is_bind_mountpoint (const bool val)
 
void set_is_chunked_file (const bool val)
 
void set_is_hidden (const bool val)
 
- Public Member Functions inherited from catalog::DirectoryEntryBase
 DirectoryEntryBase ()
 
bool IsRegular () const
 
bool IsLink () const
 
bool IsDirectory () const
 
bool IsFifo () const
 
bool IsSocket () const
 
bool IsCharDev () const
 
bool IsBlockDev () const
 
bool IsSpecial () const
 
bool IsExternalFile () const
 
bool IsDirectIo () const
 
bool HasXattrs () const
 
inode_t inode () const
 
uint32_t linkcount () const
 
NameString name () const
 
LinkString symlink () const
 
time_t mtime () const
 
unsigned int mode () const
 
uid_t uid () const
 
gid_t gid () const
 
shash::Any checksum () const
 
const shash::Anychecksum_ptr () const
 
shash::Algorithms hash_algorithm () const
 
uint64_t size () const
 
dev_t rdev () const
 
std::string GetFullPath (const std::string &parent_directory) const
 
void set_inode (const inode_t inode)
 
void set_linkcount (const uint32_t linkcount)
 
void set_symlink (const LinkString &symlink)
 
void set_has_xattrs (const bool has_xattrs)
 
zlib::Algorithms compression_algorithm () const
 
struct stat GetStatStructure () const
 
Differences CompareTo (const DirectoryEntryBase &other) const
 
bool operator== (const DirectoryEntryBase &other) const
 
bool operator!= (const DirectoryEntryBase &other) const
 

Private Attributes

uint32_t hardlink_group_
 
bool is_nested_catalog_root_
 
bool is_nested_catalog_mountpoint_
 
bool is_bind_mountpoint_
 
bool is_chunked_file_
 
bool is_hidden_
 
bool is_negative_
 

Friends

class SqlLookup
 
class SqlDirentWrite
 
class swissknife::CommandMigrate
 
class WritableCatalogManager
 
class DirectoryEntryTestFactory
 

Additional Inherited Members

- Public Types inherited from catalog::DirectoryEntryBase
typedef unsigned int Differences
 
- Static Public Attributes inherited from catalog::DirectoryEntryBase
static const inode_t kInvalidInode = 0
 
- Protected Attributes inherited from catalog::DirectoryEntryBase
inode_t inode_
 
NameString name_
 
unsigned int mode_
 
uid_t uid_
 
gid_t gid_
 
uint64_t size_
 
time_t mtime_
 
LinkString symlink_
 
uint32_t linkcount_
 
bool has_xattrs_
 
shash::Any checksum_
 
bool is_external_file_
 
bool is_direct_io_
 
zlib::Algorithms compression_algorithm_
 

Detailed Description

In addition to the file system meta-data covered by DirectoryEntryBase, DirectoryEntries contain cvmfs-specific meta data. Currently these are the following things:

  • Pointer to the originating catalog
  • Markers for nested catalog transition points (mountpoint and root entry)
  • Transient marker storing the time of caching (Fuse page caches). This is required to invalidate caches after a catalog update
  • Hardlink group used to emulate hardlinks in cvmfs

Definition at line 252 of file directory_entry.h.

Constructor & Destructor Documentation

catalog::DirectoryEntry::DirectoryEntry ( const DirectoryEntryBase base)
inlineexplicit

This is kind of a copy constructor allowing us to create DirectoryEntries directly from DirectoryEntryBase objects. We make it explicit, to disallow black magic from happening. It uses the copy constructor of DirectoryEntryBase and initializes the additional fields of DirectoryEntry.

Definition at line 272 of file directory_entry.h.

catalog::DirectoryEntry::DirectoryEntry ( )
inline

Definition at line 282 of file directory_entry.h.

catalog::DirectoryEntry::DirectoryEntry ( SpecialDirents  special_type)
inlineexplicit

Definition at line 291 of file directory_entry.h.

Here is the call graph for this function:

Member Function Documentation

DirectoryEntryBase::Differences catalog::DirectoryEntry::CompareTo ( const DirectoryEntry other) const
SpecialDirents catalog::DirectoryEntry::GetSpecial ( ) const
inline

Definition at line 300 of file directory_entry.h.

Referenced by cvmfs::cvmfs_lookup(), LibContext::GetDirentForPath(), cvmfs::GetDirentForPath(), and cvmfs::ReplyNegative().

Here is the caller graph for this function:

uint32_t catalog::DirectoryEntry::hardlink_group ( ) const
inline

Definition at line 320 of file directory_entry.h.

Referenced by swissknife::CommandCheck::CompareEntries(), CompareTo(), and swissknife::CommandMigrate::MigrationWorker_20x::FindRootEntryInformation().

Here is the caller graph for this function:

bool catalog::DirectoryEntry::IsBindMountpoint ( ) const
inline

Definition at line 317 of file directory_entry.h.

Referenced by catalog::WritableCatalogManager::CloneTreeImpl(), CompareTo(), and catalog::SqlDirent::CreateDatabaseFlags().

Here is the caller graph for this function:

bool catalog::DirectoryEntry::IsHidden ( ) const
inline
bool catalog::DirectoryEntry::IsNegative ( ) const
inline

Definition at line 312 of file directory_entry.h.

Referenced by catalog::CatalogDatabase::InsertInitialValues().

Here is the caller graph for this function:

bool catalog::DirectoryEntry::operator!= ( const DirectoryEntry other) const
inline

Definition at line 308 of file directory_entry.h.

bool catalog::DirectoryEntry::operator== ( const DirectoryEntry other) const
inline

Definition at line 305 of file directory_entry.h.

Here is the call graph for this function:

void catalog::DirectoryEntry::set_hardlink_group ( const uint32_t  group)
inline

Definition at line 322 of file directory_entry.h.

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

Here is the caller graph for this function:

void catalog::DirectoryEntry::set_is_bind_mountpoint ( const bool  val)
inline

Definition at line 331 of file directory_entry.h.

Referenced by catalog::VirtualCatalog::InsertSnapshot().

Here is the caller graph for this function:

void catalog::DirectoryEntry::set_is_chunked_file ( const bool  val)
inline

Definition at line 334 of file directory_entry.h.

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

Here is the caller graph for this function:

void catalog::DirectoryEntry::set_is_hidden ( const bool  val)
inline

Definition at line 337 of file directory_entry.h.

Referenced by catalog::VirtualCatalog::CreateBaseDirectory().

Here is the caller graph for this function:

void catalog::DirectoryEntry::set_is_nested_catalog_root ( const bool  val)
inline

Friends And Related Function Documentation

friend class DirectoryEntryTestFactory
friend

Definition at line 262 of file directory_entry.h.

friend class SqlDirentWrite
friend

Definition at line 256 of file directory_entry.h.

friend class SqlLookup
friend

Definition at line 254 of file directory_entry.h.

friend class swissknife::CommandMigrate
friend

Definition at line 258 of file directory_entry.h.

friend class WritableCatalogManager
friend

Definition at line 260 of file directory_entry.h.

Member Data Documentation

uint32_t catalog::DirectoryEntry::hardlink_group_
private

Hardlink handling is emulated in CVMFS. Since inodes are allocated on demand we save hardlink relationships using the same hardlink_group.

Definition at line 346 of file directory_entry.h.

Referenced by catalog::SqlDirentWrite::BindDirentFields(), catalog::SqlLookup::GetDirent(), hardlink_group(), and set_hardlink_group().

bool catalog::DirectoryEntry::is_bind_mountpoint_
private
bool catalog::DirectoryEntry::is_chunked_file_
private
bool catalog::DirectoryEntry::is_hidden_
private

Definition at line 353 of file directory_entry.h.

Referenced by catalog::SqlLookup::GetDirent(), IsHidden(), and set_is_hidden().

bool catalog::DirectoryEntry::is_negative_
private

Definition at line 354 of file directory_entry.h.

Referenced by GetSpecial(), and IsNegative().

bool catalog::DirectoryEntry::is_nested_catalog_mountpoint_
private
bool catalog::DirectoryEntry::is_nested_catalog_root_
private

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