#include "squid.h"
#include "debug/Messages.h"
#include "event.h"
#include "globals.h"
#include "md5.h"
#include "SquidConfig.h"
#include "StatCounters.h"
#include "Store.h"
#include "store/Disk.h"
#include "store_digest.h"
#include "store_key_md5.h"
#include "store_rebuild.h"
#include "StoreSearch.h"
#include "time/gadgets.h"
#include <cerrno>
#include "fde.h"
#include "Generic.h"
#include "StoreMeta.h"
#include "StoreMetaUnpacker.h"

Go to the source code of this file.
Classes | |
struct | store_rebuild_progress |
struct | InitStoreEntry |
Functions | |
static void | storeCleanup (void *) |
void | storeRebuildComplete (StoreRebuildData *dc) |
void | storeRebuildStart (void) |
void | storeRebuildProgress (int sd_index, int total, int sofar) |
bool | storeRebuildLoadEntry (int fd, int diskIndex, MemBuf &buf, StoreRebuildData &) |
loads entry from disk; fills supplied memory buffer on success More... | |
bool | storeRebuildParseEntry (MemBuf &buf, StoreEntry &tmpe, cache_key *key, StoreRebuildData &stats, uint64_t expectedSize) |
parses entry buffer and validates entry metadata; fills e on success More... | |
Variables | |
static StoreRebuildData | counts |
static store_rebuild_progress * | RebuildProgress = NULL |
Function Documentation
◆ storeCleanup()
|
static |
Definition at line 50 of file store_rebuild.cc.
References assert, StoreSearch::currentItem(), DBG_IMPORTANT, debugs, StoreEntry::disk(), Store::Disk::doubleCheck(), EBIT_SET, EBIT_TEST, ENTRY_VALIDATED, eventAdd(), Debug::Extra(), fatalf(), StoreEntry::flags, StoreEntry::hasDisk(), Important, StoreSearch::isDone(), StoreSearch::next(), NULL, opt_store_doublecheck, Store::Root(), Store::Controller::search(), store_digest, Store::Controller::store_dirs_rebuilding, and storeDigestNoteStoreReady().
Referenced by storeRebuildComplete().
◆ storeRebuildComplete()
void storeRebuildComplete | ( | StoreRebuildData * | dc | ) |
Definition at line 122 of file store_rebuild.cc.
Referenced by Store::Disks::init(), Rock::SwapDir::ioCompletedNotification(), and Rock::Rebuild::swanSong().
◆ storeRebuildLoadEntry()
bool storeRebuildLoadEntry | ( | int | fd, |
int | diskIndex, | ||
MemBuf & | buf, | ||
StoreRebuildData & | |||
) |
Definition at line 303 of file store_rebuild.cc.
Referenced by Rock::Rebuild::loadOneSlot(), and Fs::Ufs::RebuildState::rebuildFromDirectory().
◆ storeRebuildParseEntry()
bool storeRebuildParseEntry | ( | MemBuf & | buf, |
StoreEntry & | tmpe, | ||
cache_key * | key, | ||
StoreRebuildData & | stats, | ||
uint64_t | expectedSize | ||
) |
Definition at line 324 of file store_rebuild.cc.
References assert, MemBuf::content(), MemBuf::contentSize(), StoreMetaUnpacker::createStoreMeta(), DBG_IMPORTANT, debugs, EBIT_TEST, StoreEntry::flags, for_each(), StoreMetaUnpacker::isBufferZero(), hash_link::key, KEY_PRIVATE, NULL, SQUID_MD5_DIGEST_LENGTH, Ping::stats, storeKeyNull(), storeSwapTLVFree(), and StoreEntry::swap_file_sz.
Referenced by Rock::Rebuild::importEntry(), and Fs::Ufs::RebuildState::rebuildFromDirectory().
◆ storeRebuildProgress()
Definition at line 203 of file store_rebuild.cc.
References SquidConfig::cacheSwap, Config, debugs, double, Important, Store::DiskConfig::n_configured, NULL, RebuildProgress, store_rebuild_progress::scanned, squid_curtime, and store_rebuild_progress::total.
Referenced by Rock::Rebuild::loadingSteps(), and Fs::Ufs::RebuildState::rebuildStep().
◆ storeRebuildStart()
void storeRebuildStart | ( | void | ) |
Definition at line 180 of file store_rebuild.cc.
References SquidConfig::cacheSwap, Config, counts, Store::DiskConfig::n_configured, RebuildProgress, and xcalloc().
Referenced by storeInit().
Variable Documentation
◆ counts
|
static |
Definition at line 28 of file store_rebuild.cc.
Referenced by Fs::Ufs::RebuildState::addIfFresh(), Rock::Rebuild::addSlotToEntry(), Rock::Rebuild::Stats::completed(), Fs::Ufs::RebuildState::evictStaleAndContinue(), Rock::Rebuild::finalizeOrThrow(), Rock::Rebuild::freeSlot(), Rock::Rebuild::importEntry(), Rock::Rebuild::loadingSteps(), Rock::Rebuild::loadOneSlot(), Fs::Ufs::RebuildState::rebuildFromDirectory(), Fs::Ufs::RebuildState::rebuildFromSwapLog(), Rock::Rebuild::start(), storeRebuildComplete(), storeRebuildStart(), Rock::Rebuild::swanSong(), Rock::Rebuild::useNewSlot(), and Rock::Rebuild::validationSteps().
◆ RebuildProgress
|
static |
Definition at line 41 of file store_rebuild.cc.
Referenced by storeRebuildComplete(), storeRebuildProgress(), and storeRebuildStart().