CernVM-FS  2.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
glue::PageCacheTracker Class Reference

#include <glue_buffer.h>

Collaboration diagram for glue::PageCacheTracker:

Classes

struct  Entry
 
class  EvictRaii
 
struct  OpenDirectives
 
struct  Statistics
 

Public Member Functions

Statistics GetStatistics ()
 
 PageCacheTracker ()
 
 PageCacheTracker (const PageCacheTracker &other)
 
PageCacheTrackeroperator= (const PageCacheTracker &other)
 
 ~PageCacheTracker ()
 
OpenDirectives Open (uint64_t inode, const shash::Any &hash, const struct stat &info)
 
OpenDirectives OpenDirect ()
 
void Close (uint64_t inode)
 
bool GetInfoIfOpen (uint64_t inode, shash::Any *hash, struct stat *info)
 
EvictRaii GetEvictRaii ()
 
void Disable ()
 

Static Public Attributes

static const unsigned int kBitDirectIo = 62
 

Private Member Functions

void InitLock ()
 
void CopyFrom (const PageCacheTracker &other)
 

Private Attributes

pthread_mutex_t * lock_
 
unsigned version_
 
bool is_active_
 
Statistics statistics_
 
SmallHashDynamic< uint64_t, Entrymap_
 
StatStore stat_store_
 

Static Private Attributes

static const unsigned kVersion = 0
 

Detailed Description

Tracks the content hash associated to inodes of regular files whose content may be in the page cache. It is used in cvmfs_open() and cvmfs_close().

Definition at line 921 of file glue_buffer.h.

Constructor & Destructor Documentation

glue::PageCacheTracker::PageCacheTracker ( )

Definition at line 268 of file glue_buffer.cc.

Here is the call graph for this function:

glue::PageCacheTracker::PageCacheTracker ( const PageCacheTracker other)
explicit

Definition at line 280 of file glue_buffer.cc.

Here is the call graph for this function:

glue::PageCacheTracker::~PageCacheTracker ( )

Definition at line 274 of file glue_buffer.cc.

Referenced by RestoreState().

Here is the caller graph for this function:

Member Function Documentation

void glue::PageCacheTracker::Close ( uint64_t  inode)

Definition at line 398 of file glue_buffer.cc.

Referenced by cvmfs::cvmfs_release().

Here is the call graph for this function:

Here is the caller graph for this function:

void glue::PageCacheTracker::CopyFrom ( const PageCacheTracker other)
private

Definition at line 296 of file glue_buffer.cc.

Referenced by operator=(), and PageCacheTracker().

Here is the call graph for this function:

Here is the caller graph for this function:

void glue::PageCacheTracker::Disable ( )
inline

Definition at line 1044 of file glue_buffer.h.

Referenced by MountPoint::CreateTables(), and RestoreState().

Here is the caller graph for this function:

EvictRaii glue::PageCacheTracker::GetEvictRaii ( )
inline

Definition at line 1040 of file glue_buffer.h.

Referenced by cvmfs::cvmfs_forget().

Here is the caller graph for this function:

bool glue::PageCacheTracker::GetInfoIfOpen ( uint64_t  inode,
shash::Any hash,
struct stat *  info 
)
inline

Definition at line 1025 of file glue_buffer.h.

Referenced by cvmfs::cvmfs_getattr(), and cvmfs::FixupOpenInode().

Here is the call graph for this function:

Here is the caller graph for this function:

Statistics glue::PageCacheTracker::GetStatistics ( )
inline

Definition at line 1009 of file glue_buffer.h.

Referenced by TalkManager::MainResponder().

Here is the caller graph for this function:

void glue::PageCacheTracker::InitLock ( )
private

Definition at line 309 of file glue_buffer.cc.

Referenced by PageCacheTracker().

Here is the call graph for this function:

Here is the caller graph for this function:

PageCacheTracker::OpenDirectives glue::PageCacheTracker::Open ( uint64_t  inode,
const shash::Any hash,
const struct stat &  info 
)

Definition at line 316 of file glue_buffer.cc.

Referenced by cvmfs::cvmfs_open().

Here is the call graph for this function:

Here is the caller graph for this function:

PageCacheTracker::OpenDirectives glue::PageCacheTracker::OpenDirect ( )

Forced direct I/O open. Used when the corresponding flag is set in the file catalogs. In this case, we don't need to track the inode.

Definition at line 387 of file glue_buffer.cc.

Referenced by cvmfs::cvmfs_open().

Here is the caller graph for this function:

PageCacheTracker & glue::PageCacheTracker::operator= ( const PageCacheTracker other)

Definition at line 286 of file glue_buffer.cc.

Here is the call graph for this function:

Member Data Documentation

bool glue::PageCacheTracker::is_active_
private

The page cache tracker only works correctly if it is used from the start of the mount. If the instance is hot-patched from a previous version, the page cache tracker remains turned off.

Definition at line 1059 of file glue_buffer.h.

Referenced by Close(), CopyFrom(), Disable(), Open(), and OpenDirect().

const unsigned int glue::PageCacheTracker::kBitDirectIo = 62
static

In the fuse file handle, use bit 62 to indicate that the file was opened with a direct I/O setting and cvmfs_release() should not call Close(). Note that the sign bit (bit 63) indicates chunked files.

Definition at line 950 of file glue_buffer.h.

Referenced by cvmfs::cvmfs_read(), cvmfs::cvmfs_release(), and cvmfs::FillOpenFlags().

const unsigned glue::PageCacheTracker::kVersion = 0
staticprivate

Definition at line 1047 of file glue_buffer.h.

Referenced by CopyFrom().

pthread_mutex_t* glue::PageCacheTracker::lock_
private
SmallHashDynamic<uint64_t, Entry> glue::PageCacheTracker::map_
private

Definition at line 1061 of file glue_buffer.h.

Referenced by Close(), CopyFrom(), GetInfoIfOpen(), Open(), and PageCacheTracker().

StatStore glue::PageCacheTracker::stat_store_
private

Definition at line 1062 of file glue_buffer.h.

Referenced by Close(), CopyFrom(), GetInfoIfOpen(), and Open().

Statistics glue::PageCacheTracker::statistics_
private

Definition at line 1060 of file glue_buffer.h.

Referenced by CopyFrom(), GetStatistics(), Open(), and OpenDirect().

unsigned glue::PageCacheTracker::version_
private

Definition at line 1053 of file glue_buffer.h.

Referenced by CopyFrom().


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