![](Disks_8h__incl.png)
![](Disks_8h__dep__incl.png)
Go to the source code of this file.
Classes | |
class | Store::Disks |
summary view of all disk caches (cache_dirs) combined More... | |
Namespaces | |
Store | |
Functions | |
void | storeDirOpenSwapLogs (void) |
int | storeDirWriteCleanLogs (int reopen) |
void | storeDirCloseSwapLogs (void) |
void | allocate_new_swapdir (Store::DiskConfig &swap) |
void | free_cachedir (Store::DiskConfig *swap) |
void | storeDirSwapLog (const StoreEntry *e, int op) |
Function Documentation
◆ allocate_new_swapdir()
void allocate_new_swapdir | ( | Store::DiskConfig & | swap | ) |
Definition at line 787 of file Disks.cc.
References Store::DiskConfig::n_allocated, Store::DiskConfig::n_configured, and Store::DiskConfig::swapDirs.
Referenced by addSwapDir(), and Store::Disks::Parse().
◆ free_cachedir()
void free_cachedir | ( | Store::DiskConfig * | swap | ) |
Definition at line 806 of file Disks.cc.
References Store::DiskConfig::n_allocated, Store::DiskConfig::n_configured, reconfiguring, and Store::DiskConfig::swapDirs.
Referenced by TestRock::tearDown(), TestStoreHashIndex::testMaxSize(), TestStoreController::testMaxSize(), TestStoreController::testStats(), TestStoreHashIndex::testStats(), TestUfs::testUfsDefaultEngine(), and TestUfs::testUfsSearch().
◆ storeDirCloseSwapLogs()
void storeDirCloseSwapLogs | ( | void | ) |
Definition at line 684 of file Disks.cc.
References SquidConfig::cacheSwap, Store::Disk::closeLog(), Config, Store::DiskConfig::n_configured, and SwapDirByIndex().
Referenced by mainReconfigureStart().
◆ storeDirOpenSwapLogs()
void storeDirOpenSwapLogs | ( | void | ) |
Definition at line 677 of file Disks.cc.
References SquidConfig::cacheSwap, Config, Store::DiskConfig::n_configured, Store::Disk::openLog(), and SwapDirByIndex().
Referenced by mainReconfigureFinish(), and storeDirWriteCleanLogs().
◆ storeDirSwapLog()
void storeDirSwapLog | ( | const StoreEntry * | e, |
int | op | ||
) |
An entry written to the swap log MUST have the following properties.
- It MUST be a public key. It does no good to log a public ADD, change the key, then log a private DEL. So we need to log a DEL before we change a key from public to private.
- It MUST have a valid (> -1) swap_filen.
Definition at line 839 of file Disks.cc.
References asHex(), assert, debugs, StoreEntry::disk(), EBIT_TEST, ENTRY_SPECIAL, StoreEntry::flags, StoreEntry::getMD5Text(), StoreEntry::hasDisk(), KEY_PRIVATE, Store::Disk::logEntry(), Store::NewLocalSearch(), STUB_RETVAL, StoreEntry::swap_dirn, StoreEntry::swap_filen, SWAP_LOG_MAX, SWAP_LOG_NOP, and swap_log_op_str.
Referenced by Fs::Ufs::RebuildState::addIfFresh(), Store::Disks::evictCached(), StoreEntry::forcePublicKey(), and storeSwapOutFileClosed().
◆ storeDirWriteCleanLogs()
storeDirWriteCleanLogs
Writes a "clean" swap log file from in-memory metadata. This is a rewrite of the original function to troll each StoreDir and write the logs, and flush at the end of the run. Thanks goes to Eric Stern, since this solution came out of his COSS code.
Definition at line 700 of file Disks.cc.
References SquidConfig::cacheSwap, Config, current_time, DBG_IMPORTANT, debugs, getCurrentTime(), Important, Store::DiskConfig::n_configured, Store::Controller::store_dirs_rebuilding, storeDirOpenSwapLogs(), SwapDirByIndex(), tvSubDsec(), StoreEntry::write(), and Store::Disk::writeCleanDone().
Referenced by death(), fatal(), fatal_dump(), mainRotate(), SquidShutdown(), and TestUfs::testUfsSearch().
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products