store_rebuild.cc File Reference
#include "squid.h"
#include "debug/Messages.h"
#include "event.h"
#include "fde.h"
#include "globals.h"
#include "md5.h"
#include "SquidConfig.h"
#include "StatCounters.h"
#include "Store.h"
#include "store/Disk.h"
#include "store/SwapMetaIn.h"
#include "store_digest.h"
#include "store_key_md5.h"
#include "store_rebuild.h"
#include "StoreSearch.h"
#include "time/gadgets.h"
#include <cerrno>
Include dependency graph for store_rebuild.cc:

Go to the source code of this file.

Classes

struct  store_rebuild_progress
 

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)
 

Variables

static StoreRebuildData counts
 
static store_rebuild_progressRebuildProgress = nullptr
 

Function Documentation

◆ storeCleanup()

◆ storeRebuildComplete()

◆ storeRebuildLoadEntry()

◆ storeRebuildParseEntry()

bool storeRebuildParseEntry ( MemBuf buf,
StoreEntry e,
cache_key key,
StoreRebuildData counts,
uint64_t  expectedSize 
)

Parses the given Store entry metadata, filling e and key. Optimization: Both e and key parameters may be updated even on failures.

Parameters
bufmemory containing serialized Store entry swap metadata (at least)
ecaller's temporary StoreEntry object for returning parsed metadata
keycaller's temporary Store entry key buffer; usable to set e.key
expectedSizeeither total entry size (including swap metadata) or 0
Return values
truesuccess; e/key filled with parsed metadata
falsefailure; e/key ought to be ignored (may be filled/dirty)

Definition at line 275 of file store_rebuild.cc.

References CurrentException(), DBG_IMPORTANT, debugs, EBIT_TEST, StoreEntry::flags, Important, hash_link::key, KEY_PRIVATE, Ping::stats, StoreEntry::swap_file_sz, and Store::UnpackIndexSwapMeta().

Referenced by Rock::Rebuild::importEntry(), and Fs::Ufs::RebuildState::rebuildFromDirectory().

◆ storeRebuildProgress()

◆ storeRebuildStart()

void storeRebuildStart ( void  )

Variable Documentation

◆ counts

◆ RebuildProgress

store_rebuild_progress* RebuildProgress = nullptr
static

Definition at line 43 of file store_rebuild.cc.

Referenced by storeRebuildComplete(), storeRebuildProgress(), and storeRebuildStart().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors