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

#include <nfs_maps_leveldb.h>

Inheritance diagram for NfsMapsLeveldb:
Collaboration diagram for NfsMapsLeveldb:

Classes

class  ForkAwareEnv
 
struct  FuncArg
 

Public Member Functions

virtual ~NfsMapsLeveldb ()
 
virtual uint64_t GetInode (const PathString &path)
 
virtual bool GetPath (const uint64_t inode, PathString *path)
 
virtual void SetInodeResidue (unsigned residue_class, unsigned remainder)
 
virtual void Spawn ()
 
virtual std::string GetStatistics ()
 
- Public Member Functions inherited from NfsMaps
virtual ~NfsMaps ()
 

Static Public Member Functions

static NfsMapsLeveldbCreate (const std::string &leveldb_dir, const uint64_t root_inode, const bool rebuild, perf::Statistics *statistics)
 

Private Member Functions

 NfsMapsLeveldb ()
 
void PutInode2Path (const uint64_t inode, const PathString &path)
 
void PutPath2Inode (const shash::Md5 &path, const uint64_t inode)
 
uint64_t FindInode (const shash::Md5 &path)
 

Private Attributes

leveldb::DB * db_inode2path_
 
leveldb::DB * db_path2inode_
 
leveldb::Cache * cache_inode2path_
 
leveldb::Cache * cache_path2inode_
 
const leveldb::FilterPolicy * filter_inode2path_
 
const leveldb::FilterPolicy * filter_path2inode_
 
ForkAwareEnvfork_aware_env_
 
uint64_t root_inode_
 
uint64_t seq_
 
pthread_mutex_t * lock_
 
bool spawned_
 
unsigned inode_residue_class_
 
unsigned inode_remainder_
 
perf::Countern_db_added_
 

Detailed Description

Definition at line 30 of file nfs_maps_leveldb.h.

Constructor & Destructor Documentation

NfsMapsLeveldb::~NfsMapsLeveldb ( )
virtual

Definition at line 309 of file nfs_maps_leveldb.cc.

Here is the call graph for this function:

NfsMapsLeveldb::NfsMapsLeveldb ( )
private

Definition at line 287 of file nfs_maps_leveldb.cc.

Referenced by Create().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Function Documentation

NfsMapsLeveldb * NfsMapsLeveldb::Create ( const std::string &  leveldb_dir,
const uint64_t  root_inode,
const bool  rebuild,
perf::Statistics statistics 
)
static

Definition at line 104 of file nfs_maps_leveldb.cc.

Referenced by FileSystem::SetupNfsMaps().

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t NfsMapsLeveldb::FindInode ( const shash::Md5 path)
private

Definition at line 195 of file nfs_maps_leveldb.cc.

Referenced by Create(), and GetInode().

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t NfsMapsLeveldb::GetInode ( const PathString path)
virtual

Implements NfsMaps.

Definition at line 220 of file nfs_maps_leveldb.cc.

Referenced by Create().

Here is the call graph for this function:

Here is the caller graph for this function:

bool NfsMapsLeveldb::GetPath ( const uint64_t  inode,
PathString path 
)
virtual

Finds the path that belongs to an inode. This must be successful. The inode input comes from the file system, i.e. it must have been issued before.

Returns
false if not found

Implements NfsMaps.

Definition at line 249 of file nfs_maps_leveldb.cc.

Here is the call graph for this function:

string NfsMapsLeveldb::GetStatistics ( )
virtual

Reimplemented from NfsMaps.

Definition at line 274 of file nfs_maps_leveldb.cc.

void NfsMapsLeveldb::PutInode2Path ( const uint64_t  inode,
const PathString path 
)
private

Definition at line 326 of file nfs_maps_leveldb.cc.

Referenced by GetInode().

Here is the call graph for this function:

Here is the caller graph for this function:

void NfsMapsLeveldb::PutPath2Inode ( const shash::Md5 path,
const uint64_t  inode 
)
private

Definition at line 345 of file nfs_maps_leveldb.cc.

Referenced by GetInode(), and ~NfsMapsLeveldb().

Here is the call graph for this function:

Here is the caller graph for this function:

void NfsMapsLeveldb::SetInodeResidue ( unsigned  residue_class,
unsigned  remainder 
)
virtual

Ensures that NFS maps inodes have the form an+b so that we can have non-overlapping inodes for independent repositories.

Reimplemented from NfsMaps.

Definition at line 180 of file nfs_maps_leveldb.cc.

virtual void NfsMapsLeveldb::Spawn ( )
inlinevirtual

Reimplemented from NfsMaps.

Definition at line 36 of file nfs_maps_leveldb.h.

Member Data Documentation

leveldb::Cache* NfsMapsLeveldb::cache_inode2path_
private

Definition at line 80 of file nfs_maps_leveldb.h.

Referenced by Create(), and ~NfsMapsLeveldb().

leveldb::Cache* NfsMapsLeveldb::cache_path2inode_
private

Definition at line 81 of file nfs_maps_leveldb.h.

Referenced by Create(), and ~NfsMapsLeveldb().

leveldb::DB* NfsMapsLeveldb::db_inode2path_
private

Definition at line 78 of file nfs_maps_leveldb.h.

Referenced by Create(), GetPath(), GetStatistics(), PutInode2Path(), and ~NfsMapsLeveldb().

leveldb::DB* NfsMapsLeveldb::db_path2inode_
private

Definition at line 79 of file nfs_maps_leveldb.h.

Referenced by Create(), FindInode(), GetStatistics(), PutPath2Inode(), and ~NfsMapsLeveldb().

const leveldb::FilterPolicy* NfsMapsLeveldb::filter_inode2path_
private

Definition at line 82 of file nfs_maps_leveldb.h.

Referenced by Create(), and ~NfsMapsLeveldb().

const leveldb::FilterPolicy* NfsMapsLeveldb::filter_path2inode_
private

Definition at line 83 of file nfs_maps_leveldb.h.

Referenced by Create(), and ~NfsMapsLeveldb().

ForkAwareEnv* NfsMapsLeveldb::fork_aware_env_
private

Definition at line 84 of file nfs_maps_leveldb.h.

Referenced by Create(), and ~NfsMapsLeveldb().

unsigned NfsMapsLeveldb::inode_remainder_
private

Definition at line 91 of file nfs_maps_leveldb.h.

Referenced by SetInodeResidue().

unsigned NfsMapsLeveldb::inode_residue_class_
private

Definition at line 90 of file nfs_maps_leveldb.h.

Referenced by GetInode(), and SetInodeResidue().

pthread_mutex_t* NfsMapsLeveldb::lock_
private

Definition at line 87 of file nfs_maps_leveldb.h.

Referenced by GetInode(), NfsMapsLeveldb(), SetInodeResidue(), and ~NfsMapsLeveldb().

perf::Counter* NfsMapsLeveldb::n_db_added_
private

Definition at line 93 of file nfs_maps_leveldb.h.

Referenced by Create(), and GetInode().

uint64_t NfsMapsLeveldb::root_inode_
private

Definition at line 85 of file nfs_maps_leveldb.h.

Referenced by Create().

uint64_t NfsMapsLeveldb::seq_
private

Definition at line 86 of file nfs_maps_leveldb.h.

Referenced by Create(), GetInode(), SetInodeResidue(), and ~NfsMapsLeveldb().

bool NfsMapsLeveldb::spawned_
private

Definition at line 88 of file nfs_maps_leveldb.h.

Referenced by Spawn().


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