CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cvmfs_cache_null.cc File Reference
#include <alloca.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <map>
#include <string>
#include <vector>
#include "libcvmfs_cache.h"
Include dependency graph for cvmfs_cache_null.cc:

Go to the source code of this file.

Classes

struct  Object
 
struct  TxnInfo
 
struct  Listing
 
struct  ComparableHash
 

Macros

#define __STDC_FORMAT_MACROS
 

Functions

static int null_chrefcnt (struct cvmcache_hash *id, int32_t change_by)
 
static int null_obj_info (struct cvmcache_hash *id, struct cvmcache_object_info *info)
 
static int null_pread (struct cvmcache_hash *id, uint64_t offset, uint32_t *size, unsigned char *buffer)
 
static int null_start_txn (struct cvmcache_hash *id, uint64_t txn_id, struct cvmcache_object_info *info)
 
static int null_write_txn (uint64_t txn_id, unsigned char *buffer, uint32_t size)
 
static int null_commit_txn (uint64_t txn_id)
 
static int null_abort_txn (uint64_t txn_id)
 
static int null_info (struct cvmcache_info *info)
 
static int null_shrink (uint64_t shrink_to, uint64_t *used)
 
static int null_listing_begin (uint64_t lst_id, enum cvmcache_object_type type)
 
static int null_listing_next (int64_t listing_id, struct cvmcache_object_info *item)
 
static int null_listing_end (int64_t listing_id)
 
static int null_breadcrumb_store (const char *fqrn, const cvmcache_breadcrumb *breadcrumb)
 
static int null_breadcrumb_load (const char *fqrn, cvmcache_breadcrumb *breadcrumb)
 
static void Usage (const char *progname)
 
int main (int argc, char **argv)
 

Variables

map< uint64_t, TxnInfotransactions
 
map< ComparableHash, Objectstorage
 
map< uint64_t, Listinglistings
 
map< std::string,
cvmcache_breadcrumb
breadcrumbs
 
struct cvmcache_contextctx
 

Macro Definition Documentation

#define __STDC_FORMAT_MACROS

This file is part of the CernVM File System.

A demo external cache plugin. All data is stored in std::string. Feature- complete but quite inefficient.

Definition at line 8 of file cvmfs_cache_null.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 294 of file cvmfs_cache_null.cc.

Here is the call graph for this function:

static int null_abort_txn ( uint64_t  txn_id)
static

Definition at line 154 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static int null_breadcrumb_load ( const char *  fqrn,
cvmcache_breadcrumb breadcrumb 
)
static

Definition at line 277 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static int null_breadcrumb_store ( const char *  fqrn,
const cvmcache_breadcrumb breadcrumb 
)
static

Definition at line 269 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static int null_chrefcnt ( struct cvmcache_hash id,
int32_t  change_by 
)
static

Definition at line 67 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static int null_commit_txn ( uint64_t  txn_id)
static

Definition at line 146 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static int null_info ( struct cvmcache_info info)
static

Definition at line 159 of file cvmfs_cache_null.cc.

Referenced by main(), and null_shrink().

Here is the caller graph for this function:

static int null_listing_begin ( uint64_t  lst_id,
enum cvmcache_object_type  type 
)
static

Definition at line 220 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static int null_listing_end ( int64_t  listing_id)
static

Definition at line 263 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static int null_listing_next ( int64_t  listing_id,
struct cvmcache_object_info item 
)
static

Definition at line 236 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static int null_obj_info ( struct cvmcache_hash id,
struct cvmcache_object_info info 
)
static

Definition at line 81 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static int null_pread ( struct cvmcache_hash id,
uint64_t  offset,
uint32_t *  size,
unsigned char *  buffer 
)
static

Definition at line 98 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static int null_shrink ( uint64_t  shrink_to,
uint64_t *  used 
)
static

Definition at line 173 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static int null_start_txn ( struct cvmcache_hash id,
uint64_t  txn_id,
struct cvmcache_object_info info 
)
static

Definition at line 115 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static int null_write_txn ( uint64_t  txn_id,
unsigned char *  buffer,
uint32_t  size 
)
static

Definition at line 134 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

static void Usage ( const char *  progname)
static

Definition at line 289 of file cvmfs_cache_null.cc.

Referenced by main().

Here is the caller graph for this function:

Variable Documentation

map<std::string, cvmcache_breadcrumb> breadcrumbs

Definition at line 63 of file cvmfs_cache_null.cc.

Referenced by null_breadcrumb_load(), and null_breadcrumb_store().

map<uint64_t, Listing> listings

Definition at line 62 of file cvmfs_cache_null.cc.

Referenced by null_listing_begin(), null_listing_end(), and null_listing_next().

map<uint64_t, TxnInfo> transactions