store_rebuild.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 /* DEBUG: section 20 Store Rebuild Routines */
10 
11 #ifndef SQUID_STORE_REBUILD_H_
12 #define SQUID_STORE_REBUILD_H_
13 
14 #include "store_key_md5.h"
15 
17 {
18 public:
20  objcount(0), expcount(0), scancount(0), clashcount(0),
21  dupcount(0), cancelcount(0), invalid(0), badflags(0),
23  {}
24 
25  int objcount; /* # objects successfully reloaded */
26  int expcount; /* # objects expired */
27  int scancount; /* # entries scanned or read from state file */
28  int clashcount; /* # swapfile clashes avoided */
29  int dupcount; /* # duplicates purged */
30  int cancelcount; /* # SWAP_LOG_DEL objects purged */
31  int invalid; /* # bad lines */
32  int badflags; /* # bad e->flags */
35 };
36 
37 void storeRebuildStart(void);
39 void storeRebuildProgress(int sd_index, int total, int sofar);
40 
42 bool storeRebuildLoadEntry(int fd, int diskIndex, MemBuf &buf, StoreRebuildData &counts);
44 bool storeRebuildParseEntry(MemBuf &buf, StoreEntry &e, cache_key *key, StoreRebuildData &counts, uint64_t expectedSize);
47 
48 #endif /* SQUID_STORE_REBUILD_H_ */
49 
unsigned char cache_key
Store key.
Definition: forward.h:29
bool storeRebuildKeepEntry(const StoreEntry &e, const cache_key *key, StoreRebuildData &counts)
checks whether the loaded entry should be kept; updates counters
void storeRebuildComplete(StoreRebuildData *)
static StoreRebuildData counts
void const char * buf
Definition: stub_helper.cc:16
bool storeRebuildParseEntry(MemBuf &buf, StoreEntry &e, cache_key *key, StoreRebuildData &counts, uint64_t expectedSize)
parses entry buffer and validates entry metadata; fills e on success
void storeRebuildProgress(int sd_index, int total, int sofar)
bool storeRebuildLoadEntry(int fd, int diskIndex, MemBuf &buf, StoreRebuildData &counts)
loads entry from disk; fills supplied memory buffer on success
Definition: MemBuf.h:23
void const cache_key * key
void storeRebuildStart(void)

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors