Disks.h File Reference
#include "store/Controlled.h"
#include "store/forward.h"
Include dependency graph for Disks.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Store::Disks
 summary view of all disk caches (cache_dirs) combined More...
 

Namespaces

 Store
 

Typedefs

typedef int STDIRSELECT (const StoreEntry *e)
 

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)
 

Variables

STDIRSELECTstoreDirSelectSwapDir
 

Typedef Documentation

typedef int STDIRSELECT(const StoreEntry *e)

Definition at line 75 of file Disks.h.

Function Documentation

void allocate_new_swapdir ( Store::DiskConfig swap)
void storeDirCloseSwapLogs ( void  )

Definition at line 556 of file Disks.cc.

References SquidConfig::cacheSwap, Config, INDEXSD, and Store::DiskConfig::n_configured.

Referenced by mainReconfigureStart().

void storeDirOpenSwapLogs ( void  )
void storeDirSwapLog ( const StoreEntry e,
int  op 
)

An entry written to the swap log MUST have the following properties.

  1. 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.
  2. It MUST have a valid (> -1) swap_filen.

Definition at line 712 of file Disks.cc.

References assert, debugs, EBIT_TEST, ENTRY_SPECIAL, StoreEntry::flags, StoreEntry::getMD5Text(), INDEXSD, KEY_PRIVATE, StoreEntry::swap_dirn, StoreEntry::swap_filen, SWAP_LOG_MAX, SWAP_LOG_NOP, and swap_log_op_str.

Referenced by StoreEntry::forcePublicKey(), Fs::Ufs::RebuildState::rebuildFromDirectory(), Fs::Ufs::RebuildState::rebuildFromSwapLog(), StoreEntry::release(), StoreEntry::setPrivateKey(), and storeSwapOutFileClosed().

int storeDirWriteCleanLogs ( int  reopen)

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 572 of file Disks.cc.

References SquidConfig::cacheSwap, Store::Disk::canLog(), Store::Disk::cleanLog, Config, current_time, DBG_IMPORTANT, debugs, getCurrentTime(), Store::Disk::index, INDEXSD, Store::DiskConfig::n_configured, Store::Disk::CleanLog::nextEntry(), NULL, Store::Controller::store_dirs_rebuilding, storeDirOpenSwapLogs(), tvSubDsec(), Store::Disk::CleanLog::write(), and Store::Disk::writeCleanStart().

Referenced by death(), fatal(), fatal_dump(), mainRotate(), SquidShutdown(), and testUfs::testUfsSearch().

Variable Documentation

STDIRSELECT* storeDirSelectSwapDir

This function pointer is set according to 'store_dir_select_algorithm' in squid.conf.

Definition at line 28 of file Disks.cc.

Referenced by Store::Disks::init(), and storeCreate().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors