Core Cache
Core Cache Constants
EVACUATION_SIZE
The size of the contiguous area to check for evacuation.
Core Cache Types
type span_diskid_t
Stores a 16 byte ID.
class CacheKey
The hash value for a cache object. Currently a 128 bit MD5 hash.
class EvacuationBlock
A range of content to be evacuated.
class CacheProcessor
The singleton cache management object. This handles threads and global initialization for the cache.
int
start
(int n_threads, size_t stacksize)Starts the cache processing threads, n_threads are created each with a stack of size stacksize.
class Span
Span
models a cache span. This is a contiguous span of storage.
int64_t
blocks
Number of storage blocks in the span. See
STORE_BLOCK_SIZE
.int64_t
offset
Offset (in bytes)_ to the start of the span. This is used only if the base storage is a file.
span_diskid_t
disk_id
No idea what this is.
class Store
A singleton containing all of the cache storage description.
unsigned
n_disks_in_config
The number of distinct devices in the configuration.
unsigned
n_disks
The number of valid and distinct devices in the configuration.
Span **
disk
List of spans.
char *
read_config
()Read
storage.config
and initialize the base state of the instance. The return value isnullptr
on success and a nul-terminated error string on error.
class CacheDisk
A representation of the physical device used for a Span
.
Core Cache Functions
int dir_probe
(const CacheKey *key, Vol *d, Dir *result, Dir **last_collision)
Probe the stripe directory for a candidate directory entry.
void build_vol_hash_table
(CacheHostRecord *r)
Based on the configuration record r, construct the global stripe assignment table.
int cplist_reconfigure
()
Rebuild the assignment of stripes to volumes.
void ink_cache_init
(ModuleVersion v)
Top level cache initialization logic.