CernVM-FS
2.12.0
|
#include <glue_buffer.h>
Classes | |
struct | Entry |
class | EvictRaii |
struct | OpenDirectives |
struct | Statistics |
Public Member Functions | |
Statistics | GetStatistics () |
PageCacheTracker () | |
PageCacheTracker (const PageCacheTracker &other) | |
PageCacheTracker & | operator= (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) |
bool | IsStale (const catalog::DirectoryEntry &dirent) |
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, Entry > | map_ |
StatStore | stat_store_ |
Static Private Attributes | |
static const unsigned | kVersion = 0 |
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 932 of file glue_buffer.h.
glue::PageCacheTracker::PageCacheTracker | ( | ) |
|
explicit |
glue::PageCacheTracker::~PageCacheTracker | ( | ) |
Definition at line 275 of file glue_buffer.cc.
Referenced by RestoreState().
void glue::PageCacheTracker::Close | ( | uint64_t | inode | ) |
Definition at line 406 of file glue_buffer.cc.
Referenced by cvmfs::cvmfs_open(), and cvmfs::cvmfs_release().
|
private |
Definition at line 297 of file glue_buffer.cc.
Referenced by operator=(), and PageCacheTracker().
|
inline |
Definition at line 1096 of file glue_buffer.h.
Referenced by MountPoint::CreateTables(), and RestoreState().
|
inline |
Definition at line 1092 of file glue_buffer.h.
Referenced by cvmfs::cvmfs_forget().
|
inline |
Definition at line 1036 of file glue_buffer.h.
Referenced by cvmfs::cvmfs_getattr().
|
inline |
Definition at line 1020 of file glue_buffer.h.
Referenced by TalkManager::MainResponder(), and perf::TelemetryAggregator::ManuallyUpdateSelectedCounters().
|
private |
Definition at line 310 of file glue_buffer.cc.
Referenced by PageCacheTracker().
|
inline |
Checks if the dirent's inode is registered in the page cache tracker and if
Definition at line 1057 of file glue_buffer.h.
Referenced by cvmfs::FixupOpenInode().
PageCacheTracker::OpenDirectives glue::PageCacheTracker::Open | ( | uint64_t | inode, |
const shash::Any & | hash, | ||
const struct stat & | info | ||
) |
Definition at line 317 of file glue_buffer.cc.
Referenced by cvmfs::cvmfs_open().
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 395 of file glue_buffer.cc.
Referenced by cvmfs::cvmfs_open().
PageCacheTracker & glue::PageCacheTracker::operator= | ( | const PageCacheTracker & | other | ) |
|
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 1111 of file glue_buffer.h.
Referenced by Close(), CopyFrom(), Disable(), Open(), and OpenDirect().
|
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 961 of file glue_buffer.h.
Referenced by cvmfs::cvmfs_read(), cvmfs::cvmfs_release(), and cvmfs::FillOpenFlags().
|
staticprivate |
Definition at line 1099 of file glue_buffer.h.
Referenced by CopyFrom().
|
private |
Definition at line 1104 of file glue_buffer.h.
Referenced by Close(), glue::PageCacheTracker::EvictRaii::EvictRaii(), GetInfoIfOpen(), InitLock(), IsStale(), Open(), OpenDirect(), operator=(), and ~PageCacheTracker().
|
private |
Definition at line 1113 of file glue_buffer.h.
Referenced by Close(), CopyFrom(), GetInfoIfOpen(), IsStale(), Open(), and PageCacheTracker().
|
private |
Definition at line 1114 of file glue_buffer.h.
Referenced by Close(), CopyFrom(), GetInfoIfOpen(), IsStale(), and Open().
|
private |
Definition at line 1112 of file glue_buffer.h.
Referenced by CopyFrom(), GetStatistics(), Open(), and OpenDirect().
|
private |
Definition at line 1105 of file glue_buffer.h.
Referenced by CopyFrom().