#include <RebuildState.h>
|
| CBDATA_CLASS (RebuildState) |
|
void | rebuildFromDirectory () |
| process one cache file More...
|
|
void | rebuildFromSwapLog () |
| process one swap log entry More...
|
|
void | rebuildStep () |
| load entries from swap.state or files until we run out of entries or time More...
|
|
void | addIfFresh (const cache_key *key, sfileno file_number, uint64_t swap_file_sz, time_t expires, time_t timestamp, time_t lastref, time_t lastmod, uint32_t refcount, uint16_t flags) |
| if the loaded entry metadata is still relevant, indexes the entry More...
|
|
bool | evictStaleAndContinue (const cache_key *candidateKey, const time_t maxRef, int &staleCount) |
|
int | getNextFile (sfileno *, int *size) |
|
void() | callback (void *cbdata) |
|
Definition at line 24 of file RebuildState.h.
◆ RebuildState()
Definition at line 31 of file RebuildState.cc.
References Fs::Ufs::RebuildState::Flags::clean, counts, current_time, DBG_IMPORTANT, debugs, flags, fromLog, Fs::Ufs::UFSSwapLogParser::GetUFSSwapLogParser(), LogParser, Fs::Ufs::RebuildState::Flags::need_to_validate, sd, and StoreRebuildData::updateStartTime().
◆ ~RebuildState()
Fs::Ufs::RebuildState::~RebuildState |
( |
| ) |
|
|
virtual |
◆ addIfFresh()
void Fs::Ufs::RebuildState::addIfFresh |
( |
const cache_key * |
key, |
|
|
sfileno |
file_number, |
|
|
uint64_t |
swap_file_sz, |
|
|
time_t |
expires, |
|
|
time_t |
timestamp, |
|
|
time_t |
lastref, |
|
|
time_t |
lastmod, |
|
|
uint32_t |
refcount, |
|
|
uint16_t |
flags |
|
) |
| |
|
private |
◆ callback()
void() Fs::Ufs::RebuildState::callback |
( |
void * |
cbdata | ) |
|
|
private |
◆ CBDATA_CLASS()
◆ error()
bool Fs::Ufs::RebuildState::error |
( |
| ) |
const |
|
virtual |
◆ evictStaleAndContinue()
bool Fs::Ufs::RebuildState::evictStaleAndContinue |
( |
const cache_key * |
candidateKey, |
|
|
const time_t |
maxRef, |
|
|
int & |
staleCount |
|
) |
| |
|
private |
◆ getNextFile()
int Fs::Ufs::RebuildState::getNextFile |
( |
sfileno * |
filn_p, |
|
|
int * |
size |
|
) |
| |
|
private |
Definition at line 354 of file RebuildState.cc.
References assert, SquidConfig::cacheSwap, Config, DBG_IMPORTANT, debugs, file_open(), Fs::Ufs::UFSSwapDir::FilenoBelongsHere(), MYNAME, Store::DiskConfig::n_configured, O_BINARY, SQUIDSBUFPH, SQUIDSBUFPRINT, store_open_disk_fd, and xstrerr().
◆ isDone()
bool Fs::Ufs::RebuildState::isDone |
( |
| ) |
const |
|
virtual |
◆ rebuildFromDirectory()
void Fs::Ufs::RebuildState::rebuildFromDirectory |
( |
| ) |
|
|
private |
Definition at line 141 of file RebuildState.cc.
References assert, counts, DBG_IMPORTANT, debugs, StoreEntry::expires, file_close(), StoreEntry::flags, MemBuf::init(), StoreEntry::lastModified(), StoreEntry::lastref, MYNAME, StoreEntry::refcount, sb, size, SM_PAGE_SIZE, SQUID_MD5_DIGEST_LENGTH, store_open_disk_fd, storeRebuildLoadEntry(), storeRebuildParseEntry(), StoreEntry::swap_file_sz, StoreEntry::timestamp, and xstrerr().
◆ rebuildFromSwapLog()
void Fs::Ufs::RebuildState::rebuildFromSwapLog |
( |
| ) |
|
|
private |
Definition at line 269 of file RebuildState.cc.
References StoreRebuildData::bad_log_op, StoreRebuildData::badflags, StoreRebuildData::cancelcount, StoreRebuildData::clashcount, counts, DBG_IMPORTANT, debugs, EBIT_TEST, StoreSwapLogData::expires, StoreSwapLogData::flags, StoreRebuildData::invalid, StoreSwapLogData::key, KEY_PRIVATE, StoreSwapLogData::lastmod, StoreSwapLogData::lastref, log(), StoreSwapLogData::op, StoreSwapLogData::refcount, StoreSwapLogData::sane(), StoreRebuildData::scancount, storeKeyText(), StoreSwapLogData::swap_file_sz, StoreSwapLogData::swap_filen, SWAP_LOG_ADD, SWAP_LOG_DEL, swap_log_op_str, and StoreSwapLogData::timestamp.
◆ rebuildStep()
void Fs::Ufs::RebuildState::rebuildStep |
( |
| ) |
|
|
private |
◆ _done
bool Fs::Ufs::RebuildState::_done |
|
private |
◆ cbdata
void* Fs::Ufs::RebuildState::cbdata |
|
private |
◆ counts
◆ curlvl1
int Fs::Ufs::RebuildState::curlvl1 |
◆ curlvl2
int Fs::Ufs::RebuildState::curlvl2 |
◆ done
int Fs::Ufs::RebuildState::done |
◆ entry
dirent_t* Fs::Ufs::RebuildState::entry |
◆ flags
◆ fn
int Fs::Ufs::RebuildState::fn |
◆ fromLog
bool Fs::Ufs::RebuildState::fromLog |
|
private |
◆ fullfilename
SBuf Fs::Ufs::RebuildState::fullfilename |
◆ fullpath
SBuf Fs::Ufs::RebuildState::fullpath |
◆ in_dir
int Fs::Ufs::RebuildState::in_dir |
◆ LogParser
◆ n_read
int Fs::Ufs::RebuildState::n_read |
◆ RebuildStep
void Fs::Ufs::RebuildState::RebuildStep |
|
static |
◆ sd
◆ td
DIR* Fs::Ufs::RebuildState::td |
The documentation for this class was generated from the following files: