RebuildState.cc
Go to the documentation of this file.
250Fs::Ufs::RebuildState::evictStaleAndContinue(const cache_key *candidateKey, const time_t maxRef, int &staleCount)
274 debugs(47, DBG_IMPORTANT, "Done reading " << sd->path << " swaplog (" << n_read << " entries)");
315 debugs(47, DBG_IMPORTANT, "WARNING: " << counts.bad_log_op << " invalid swap log entries found");
393 debugs(47, DBG_IMPORTANT, "ERROR: " << MYNAME << "in opendir (" << fullpath << "): " << xstrerr(xerrno));
433 debugs(47, DBG_IMPORTANT, "ERROR: " << MYNAME << "opening " << fullfilename << ": " << xstrerr(xerrno));
CBDATA_NAMESPACED_CLASS_INIT(Fs::Ufs, RebuildState)
void log(char *format,...)
Definition: RebuildState.h:25
bool evictStaleAndContinue(const cache_key *candidateKey, const time_t maxRef, int &staleCount)
Definition: RebuildState.cc:250
struct Fs::Ufs::RebuildState::Flags flags
RebuildState(RefCount< UFSSwapDir > sd)
Definition: RebuildState.cc:31
int getNextFile(sfileno *, int *size)
Definition: RebuildState.cc:354
void rebuildStep()
load entries from swap.state or files until we run out of entries or time
Definition: RebuildState.cc:106
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
Definition: RebuildState.cc:219
static bool FilenoBelongsHere(int fn, int cachedir, int level1dir, int level2dir)
Definition: UFSSwapDir.cc:1115
static UFSSwapLogParser * GetUFSSwapLogParser(FILE *fp)
Definition: UFSSwapLogParser.cc:81
Definition: MemBuf.h:24
Definition: RefCount.h:28
Definition: Store.h:42
void updateStartTime(const timeval &dirStartTime)
maintain earliest initiation time across multiple indexing cache_dirs
Definition: store_rebuild.cc:46
Definition: StoreSwapLogData.h:83
bool sane() const
consistency self-check: whether the data appears to make sense
Definition: StoreSwapLogData.cc:53
Definition: cbdata.cc:38
void eventAdd(const char *name, EVH *func, void *arg, double when, int weight, bool cbdata)
Definition: event.cc:107
int store_open_disk_fd
int opt_foreground_rebuild
int reconfiguring
Definition: RebuildState.h:22
bool storeRebuildParseEntry(MemBuf &buf, StoreEntry &tmpe, cache_key *key, StoreRebuildData &stats, uint64_t expectedSize)
Definition: store_rebuild.cc:275
void storeRebuildProgress(int sd_index, int total, int sofar)
Definition: store_rebuild.cc:205
bool storeRebuildLoadEntry(int fd, int diskIndex, MemBuf &buf, StoreRebuildData &)
loads entry from disk; fills supplied memory buffer on success
Definition: store_rebuild.cc:254
time_t getCurrentTime() STUB_RETVAL(0) int tvSubUsec(struct timeval
const char * swap_log_op_str[]
static StoreEntry * addedEntry(Store::Disk *aStore, String name, String, String)
Definition: testStoreController.cc:105
struct timeval current_time
the current UNIX time in timeval {seconds, microseconds} format
Definition: gadgets.cc:17