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

Namespaces

 anonymous_namespace{sqlitevfs.cc}
 

Classes

struct  MemStatistics
 
class  Database
 
class  Sql
 

Enumerations

enum  VfsOptions { kVfsOptNone = 0, kVfsOptDefault }
 

Functions

static void ApplyFdMap (VfsRdOnlyFile *pFile)
 
static int VfsRdOnlyClose (sqlite3_file *pFile)
 
static int VfsRdOnlyRead (sqlite3_file *pFile, void *zBuf, int iAmt, sqlite_int64 iOfst)
 
static int VfsRdOnlyWrite (sqlite3_file *pFile __attribute__((unused)), const void *zBuf __attribute__((unused)), int iAmt __attribute__((unused)), sqlite_int64 iOfst __attribute__((unused)))
 
static int VfsRdOnlyTruncate (sqlite3_file *pFile __attribute__((unused)), sqlite_int64 size __attribute__((unused)))
 
static int VfsRdOnlySync (sqlite3_file *pFile __attribute__((unused)), int flags __attribute__((unused)))
 
static int VfsRdOnlyFileSize (sqlite3_file *pFile, sqlite_int64 *pSize)
 
static int VfsRdOnlyLock (sqlite3_file *p __attribute__((unused)), int level __attribute__((unused)))
 
static int VfsRdOnlyUnlock (sqlite3_file *p __attribute__((unused)), int level __attribute__((unused)))
 
static int VfsRdOnlyCheckReservedLock (sqlite3_file *p __attribute__((unused)), int *pResOut)
 
static int VfsRdOnlyFileControl (sqlite3_file *p __attribute__((unused)), int op __attribute__((unused)), void *pArg __attribute__((unused)))
 
static int VfsRdOnlySectorSize (sqlite3_file *p __attribute__((unused)))
 
static int VfsRdOnlyDeviceCharacteristics (sqlite3_file *p __attribute__((unused)))
 
static int VfsRdOnlyOpen (sqlite3_vfs *vfs, const char *zName, sqlite3_file *pFile, int flags, int *pOutFlags)
 
static int VfsRdOnlyDelete (sqlite3_vfs *__attribute__((unused)), const char *zName __attribute__((unused)), int syncDir __attribute__((unused)))
 
static int VfsRdOnlyAccess (sqlite3_vfs *vfs, const char *zPath, int flags, int *pResOut)
 
int VfsRdOnlyFullPathname (sqlite3_vfs *vfs __attribute__((unused)), const char *zPath, int nOut, char *zOut)
 
static int VfsRdOnlyRandomness (sqlite3_vfs *vfs, int nBuf, char *zBuf)
 
static int VfsRdOnlySleep (sqlite3_vfs *vfs, int microseconds)
 
static int VfsRdOnlyCurrentTimeInt64 (sqlite3_vfs *vfs, sqlite3_int64 *piNow)
 
static int VfsRdOnlyCurrentTime (sqlite3_vfs *vfs, double *prNow)
 
static int VfsRdOnlyGetLastError (sqlite3_vfs *vfs __attribute__((unused)), int not_used1 __attribute__((unused)), char *not_used2 __attribute__((unused)))
 
bool RegisterVfsRdOnly (CacheManager *cache_mgr, perf::Statistics *statistics, const VfsOptions options)
 
bool UnregisterVfsRdOnly ()
 
void RegisterFdMapping (int from, int to)
 

Detailed Description

This file is part of the CernVM file system.

Enumeration Type Documentation

Enumerator
kVfsOptNone 
kVfsOptDefault 

Definition at line 17 of file sqlitevfs.h.

Function Documentation

static void sqlite::ApplyFdMap ( VfsRdOnlyFile *  pFile)
static

Definition at line 96 of file sqlitevfs.cc.

Referenced by VfsRdOnlyClose(), and VfsRdOnlyRead().

Here is the caller graph for this function:

void sqlite::RegisterFdMapping ( int  from,
int  to 
)

After a reload, existing file catalog file dscriptors might need a remap to the fd in the context of the restored cache manager.

Definition at line 541 of file sqlitevfs.cc.

Referenced by FileSystem::RemapCatalogFd().

Here is the caller graph for this function:

bool sqlite::RegisterVfsRdOnly ( CacheManager cache_mgr,
perf::Statistics statistics,
const VfsOptions  options 
)

Can only be registered once.

Definition at line 453 of file sqlitevfs.cc.

Referenced by FileSystem::Create().

Here is the call graph for this function:

Here is the caller graph for this function:

bool sqlite::UnregisterVfsRdOnly ( )

If the file system was the default VFS, another default VFS is selected by SQlite randomly.

Definition at line 522 of file sqlitevfs.cc.

Referenced by FileSystem::~FileSystem().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyAccess ( sqlite3_vfs *  vfs,
const char *  zPath,
int  flags,
int *  pResOut 
)
static

Cvmfs r/o file catalogs cannot have a write-ahead log or a journal.

Definition at line 317 of file sqlitevfs.cc.

Referenced by RegisterVfsRdOnly().

Here is the call graph for this function:

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyCheckReservedLock ( sqlite3_file *p   __attribute__(unused),
int *  pResOut 
)
static

Definition at line 199 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyClose ( sqlite3_file *  pFile)
static

Definition at line 111 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the call graph for this function:

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyCurrentTime ( sqlite3_vfs *  vfs,
double *  prNow 
)
static

Taken from unixCurrentTime

Definition at line 427 of file sqlitevfs.cc.

Referenced by RegisterVfsRdOnly().

Here is the call graph for this function:

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyCurrentTimeInt64 ( sqlite3_vfs *  vfs,
sqlite3_int64 *  piNow 
)
static

Taken from unixCurrentTimeInt64()

Definition at line 407 of file sqlitevfs.cc.

Referenced by RegisterVfsRdOnly(), and VfsRdOnlyCurrentTime().

Here is the call graph for this function:

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyDelete ( sqlite3_vfs *  __attribute__(unused),
const char *zName   __attribute__(unused),
int syncDir   __attribute__(unused) 
)
static

Definition at line 305 of file sqlitevfs.cc.

Referenced by RegisterVfsRdOnly().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyDeviceCharacteristics ( sqlite3_file *p   __attribute__(unused))
static

Only relevant for writing.

Definition at line 231 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyFileControl ( sqlite3_file *p   __attribute__(unused),
int op   __attribute__(unused),
void *pArg   __attribute__(unused) 
)
static

No xFileControl() verbs are implemented by this VFS.

Definition at line 211 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyFileSize ( sqlite3_file *  pFile,
sqlite_int64 *  pSize 
)
static

Definition at line 176 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the caller graph for this function:

int sqlite::VfsRdOnlyFullPathname ( sqlite3_vfs *vfs   __attribute__(unused),
const char *  zPath,
int  nOut,
char *  zOut 
)

Since the path is never stored, there is no need to produce a full path.

Definition at line 342 of file sqlitevfs.cc.

Referenced by RegisterVfsRdOnly().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyGetLastError ( sqlite3_vfs *vfs   __attribute__(unused),
int not_used1   __attribute__(unused),
char *not_used2   __attribute__(unused) 
)
static

So far unused by sqlite.

Definition at line 441 of file sqlitevfs.cc.

Referenced by RegisterVfsRdOnly().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyLock ( sqlite3_file *p   __attribute__(unused),
int level   __attribute__(unused) 
)
static

Definition at line 183 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyOpen ( sqlite3_vfs *  vfs,
const char *  zName,
sqlite3_file *  pFile,
int  flags,
int *  pOutFlags 
)
static

Supports only read-only opens. The "file name" has to be in the form of '<file descriptor>', where file descriptor is usable by the cache manager.

Definition at line 242 of file sqlitevfs.cc.

Referenced by RegisterVfsRdOnly().

Here is the call graph for this function:

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyRandomness ( sqlite3_vfs *  vfs,
int  nBuf,
char *  zBuf 
)
static

Taken from unixRandomness

Definition at line 357 of file sqlitevfs.cc.

Referenced by RegisterVfsRdOnly().

Here is the call graph for this function:

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyRead ( sqlite3_file *  pFile,
void *  zBuf,
int  iAmt,
sqlite_int64  iOfst 
)
static

On a short read, the remaining bytes must be zero'ed. TODO(jblomer): the reads seem to be rather small. Investigate buffered read.

Definition at line 127 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the call graph for this function:

Here is the caller graph for this function:

static int sqlite::VfsRdOnlySectorSize ( sqlite3_file *p   __attribute__(unused))
static

A good unit of bytes to read at once. But probably only used for writes.

Definition at line 223 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlySleep ( sqlite3_vfs *  vfs,
int  microseconds 
)
static

Like SafeSleepMs, avoid conflict with the ALARM signal.

Definition at line 389 of file sqlitevfs.cc.

Referenced by RegisterVfsRdOnly().

Here is the call graph for this function:

Here is the caller graph for this function:

static int sqlite::VfsRdOnlySync ( sqlite3_file *pFile   __attribute__(unused),
int flags   __attribute__(unused) 
)
static

Definition at line 168 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyTruncate ( sqlite3_file *pFile   __attribute__(unused),
sqlite_int64 size   __attribute__(unused) 
)
static

Definition at line 160 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyUnlock ( sqlite3_file *p   __attribute__(unused),
int level   __attribute__(unused) 
)
static

Definition at line 191 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the caller graph for this function:

static int sqlite::VfsRdOnlyWrite ( sqlite3_file *pFile   __attribute__(unused),
const void *zBuf   __attribute__(unused),
int iAmt   __attribute__(unused),
sqlite_int64 iOfst   __attribute__(unused) 
)
static

Definition at line 150 of file sqlitevfs.cc.

Referenced by VfsRdOnlyOpen().

Here is the caller graph for this function: