#include <UFSSwapDir.h>

Inheritance diagram for Fs::Ufs::UFSSwapDir:
Collaboration diagram for Fs::Ufs::UFSSwapDir:

Public Types

typedef RefCount< DiskPointer
 

Public Member Functions

 UFSSwapDir (char const *aType, const char *aModuleType)
 
virtual ~UFSSwapDir ()
 
virtual void create () override
 create system resources needed for this store to operate in the future More...
 
virtual void init () override
 
virtual void dump (StoreEntry &) const override
 
virtual bool doubleCheck (StoreEntry &) override
 
virtual bool unlinkdUseful () const override
 whether SwapDir may benefit from unlinkd More...
 
virtual void statfs (StoreEntry &) const override
 
virtual void maintain () override
 perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain More...
 
virtual void evictCached (StoreEntry &) override
 
virtual void evictIfFound (const cache_key *) override
 
virtual bool canStore (const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override
 check whether we can store the entry; if we can, report current load More...
 
virtual void reference (StoreEntry &) override
 somebody needs this entry (many cache replacement policies need to know) More...
 
virtual bool dereference (StoreEntry &) override
 
virtual StoreIOState::Pointer createStoreIO (StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override
 
virtual StoreIOState::Pointer openStoreIO (StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override
 
virtual void openLog () override
 
virtual void closeLog () override
 
virtual int writeCleanStart () override
 
virtual void writeCleanDone () override
 
virtual void logEntry (const StoreEntry &e, int op) const override
 
virtual void parse (int index, char *path) override
 
virtual void reconfigure () override
 
virtual int callback () override
 called once every main loop iteration; TODO: Move to UFS code. More...
 
virtual void sync () override
 prepare for shutdown More...
 
virtual void finalizeSwapoutSuccess (const StoreEntry &) override
 finalize the successful swapout that has been already noticed by Store More...
 
virtual void finalizeSwapoutFailure (StoreEntry &) override
 abort the failed swapout that has been already noticed by Store More...
 
virtual uint64_t currentSize () const override
 current size More...
 
virtual uint64_t currentCount () const override
 the total number of objects stored right now More...
 
virtual ConfigOptiongetOptionTree () const override
 
virtual bool smpAware () const override
 
virtual bool hasReadableEntry (const StoreEntry &) const override
 
void unlinkFile (sfileno f)
 
char * fullPath (sfileno, char *) const
 
void closeTmpSwapLog ()
 
FILE * openTmpSwapLog (int *clean_flag, int *zero_flag)
 
char * swapSubDir (int subdirn) const
 
int mapBitTest (sfileno filn)
 
void mapBitReset (sfileno filn)
 
void mapBitSet (sfileno filn)
 
StoreEntryaddDiskRestore (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, int clean)
 
int validFileno (sfileno filn, int flag) const
 
int mapBitAllocate ()
 
bool validL2 (int) const
 
bool validL1 (int) const
 
void replacementAdd (StoreEntry *e)
 
void replacementRemove (StoreEntry *e)
 
char const * type () const
 
virtual bool needsDiskStrand () const
 needs a dedicated kid process More...
 
virtual bool active () const
 
virtual bool doReportStat () const
 whether stat should be reported by this SwapDir More...
 
virtual void diskFull ()
 
virtual StoreEntryget (const cache_key *) override
 
virtual uint64_t maxSize () const override
 
virtual uint64_t minSize () const override
 the minimum size the store will shrink to via normal housekeeping More...
 
virtual int64_t maxObjectSize () const override
 the maximum size of a storable object; -1 if unlimited More...
 
void maxObjectSize (int64_t newMax)
 
virtual void getStats (StoreInfoStats &stats) const override
 collect statistics More...
 
virtual void stat (StoreEntry &) const override
 
int64_t minObjectSize () const
 the size of the smallest entry this cache_dir can store More...
 
bool objectSizeIsAcceptable (int64_t objSize) const
 
virtual void disconnect (StoreEntry &)
 called when the entry is about to forget its association with cache_dir More...
 
bool canLog (StoreEntry const &e) const
 
virtual void updateHeaders (StoreEntry *)
 make stored metadata and HTTP headers the same as in the given entry More...
 
virtual bool anchorToCache (StoreEntry &, bool &)
 
virtual bool updateAnchored (StoreEntry &)
 

Static Public Member Functions

static bool IsUFSDir (SwapDir *sd)
 
static int DirClean (int swap_index)
 
static bool FilenoBelongsHere (int fn, int cachedir, int level1dir, int level2dir)
 

Public Attributes

Fs::Ufs::UFSStrategyIO
 
void * fsdata
 
char * path
 
int index
 
int disker
 disker kid id dedicated to this SwapDir or -1 More...
 
RemovalPolicyrepl
 
int removals
 
int scanned
 
struct Store::Disk::Flags flags
 
CleanLogcleanLog
 
struct {
   int   blksize
 
fs
 

Protected Member Functions

void parseOptions (int reconfiguring)
 
void dumpOptions (StoreEntry *e) const
 
virtual bool allowOptionReconfigure (const char *const) const
 
int64_t sizeInBlocks (const int64_t size) const
 

Protected Attributes

FileMapmap
 
int suggest
 
int l1
 
int l2
 
uint64_t max_size
 maximum allocatable size of the storage area More...
 
int64_t min_objsize
 minimum size of any object stored here (-1 for no limit) More...
 
int64_t max_objsize
 maximum size of any object stored here (-1 for no limit) More...
 

Private Member Functions

void parseSizeL1L2 ()
 
bool pathIsDirectory (const char *path) const
 
bool verifyCacheDirs ()
 
void rebuild ()
 
int createDirectory (const char *path, int)
 
void createSwapSubDirs ()
 
void dumpEntry (StoreEntry &) const
 
char * logFile (char const *ext=NULL) const
 
void changeIO (DiskIOModule *)
 
bool optionIOParse (char const *option, const char *value, int reconfiguring)
 
void optionIODump (StoreEntry *e) const
 

Static Private Member Functions

static int HandleCleanEvent ()
 safely cleans a few unused files if possible More...
 

Private Attributes

int swaplog_fd
 
ConfigOptionVectorcurrentIOOptions
 
char const * ioType
 
uint64_t cur_size
 currently used space in the storage area More...
 
uint64_t n_disk_objects
 total number of objects stored More...
 
bool rebuilding_
 whether RebuildState is writing the new swap.state More...
 

Static Private Attributes

static int NumberOfUFSDirs = 0
 
static intUFSDirToGlobalDirMapping = NULL
 
static EVH CleanEvent
 

Detailed Description

Definition at line 30 of file UFSSwapDir.h.

Member Typedef Documentation

typedef RefCount<Disk> Store::Disk::Pointer
inherited

Definition at line 25 of file Disk.h.

Constructor & Destructor Documentation

Fs::Ufs::UFSSwapDir::UFSSwapDir ( char const *  aType,
const char *  aModuleType 
)

Definition at line 312 of file UFSSwapDir.cc.

References DiskIOModule::Find(), and IO.

Fs::Ufs::UFSSwapDir::~UFSSwapDir ( )
virtual

Definition at line 333 of file UFSSwapDir.cc.

References file_close(), and xfree.

Member Function Documentation

bool Store::Disk::active ( ) const
virtualinherited

may be used in this strand

Definition at line 236 of file Disk.cc.

References IamWorkerProcess(), and KidIdentifier.

Referenced by Store::Disks::anchorToCache(), and Store::Disks::get().

StoreEntry * Fs::Ufs::UFSSwapDir::addDiskRestore ( 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,
int  clean 
)
virtual bool Store::Disk::allowOptionReconfigure ( const char *  const) const
inlineprotectedvirtualinherited

Reimplemented in Rock::SwapDir.

Definition at line 84 of file Disk.h.

Referenced by Rock::SwapDir::allowOptionReconfigure().

virtual bool Store::Controlled::anchorToCache ( StoreEntry ,
bool &   
)
inlinevirtualinherited

If Transients entry cannot be attached to this storage, return false. If the entry is not found, return false. Otherwise, return true after tying the entry to this cache and setting inSync to updateAnchored().

Reimplemented in Rock::SwapDir, MemStore, and Store::Disks.

Definition at line 40 of file Controlled.h.

Referenced by Store::Disks::anchorToCache().

int Fs::Ufs::UFSSwapDir::callback ( )
overridevirtual

Reimplemented from Store::Storage.

Definition at line 1278 of file UFSSwapDir.cc.

bool Store::Disk::canLog ( StoreEntry const &  e) const
inherited
bool Fs::Ufs::UFSSwapDir::canStore ( const StoreEntry e,
int64_t  diskSpaceNeeded,
int load 
) const
overridevirtual
void Fs::Ufs::UFSSwapDir::changeIO ( DiskIOModule module)
private
void Fs::Ufs::UFSSwapDir::closeLog ( )
overridevirtual

Reimplemented from Store::Disk.

Definition at line 756 of file UFSSwapDir.cc.

References assert, debugs, file_close(), and safe_free.

void Fs::Ufs::UFSSwapDir::closeTmpSwapLog ( )
void Fs::Ufs::UFSSwapDir::create ( )
overridevirtual

Reimplemented from Store::Disk.

Definition at line 305 of file UFSSwapDir.cc.

References debugs.

Referenced by testUfs::testUfsSearch().

int Fs::Ufs::UFSSwapDir::createDirectory ( const char *  path,
int  should_exist 
)
private

Definition at line 609 of file UFSSwapDir.cc.

References DBG_IMPORTANT, debugs, fatalf(), getCurrentTime(), and xstrerr().

StoreIOState::Pointer Fs::Ufs::UFSSwapDir::createStoreIO ( StoreEntry e,
StoreIOState::STFNCB file_callback,
StoreIOState::STIOCB aCallback,
void *  callback_data 
)
overridevirtual

Implements Store::Disk.

Definition at line 551 of file UFSSwapDir.cc.

void Fs::Ufs::UFSSwapDir::createSwapSubDirs ( )
private

Definition at line 670 of file UFSSwapDir.cc.

References DBG_IMPORTANT, debugs, i, LOCAL_ARRAY, and MAXPATHLEN.

virtual uint64_t Fs::Ufs::UFSSwapDir::currentCount ( ) const
inlineoverridevirtual

Implements Store::Storage.

Definition at line 73 of file UFSSwapDir.h.

References n_disk_objects.

virtual uint64_t Fs::Ufs::UFSSwapDir::currentSize ( ) const
inlineoverridevirtual

Implements Store::Storage.

Definition at line 72 of file UFSSwapDir.h.

References cur_size.

bool Fs::Ufs::UFSSwapDir::dereference ( StoreEntry e)
overridevirtual

somebody no longer needs this entry (usually after calling reference()) return false iff the idle entry should be destroyed

Reimplemented from Store::Disk.

Definition at line 539 of file UFSSwapDir.cc.

References debugs, HERE(), StoreEntry::repl, StoreEntry::swap_dirn, and StoreEntry::swap_filen.

virtual void Store::Disk::disconnect ( StoreEntry )
inlinevirtualinherited

Reimplemented in Rock::SwapDir.

Definition at line 70 of file Disk.h.

Referenced by destroyStoreEntry().

void Store::Disk::diskFull ( )
virtualinherited

Notify this disk that it is full.

Todo:
XXX move into a protected api call between store files and their stores, rather than a top level api call

Reimplemented in Rock::SwapDir.

Definition at line 145 of file Disk.cc.

References DBG_IMPORTANT, and debugs.

Referenced by storeSwapOutFileClosed().

virtual bool Store::Disk::doReportStat ( ) const
inlinevirtualinherited

Reimplemented in Rock::SwapDir.

Definition at line 35 of file Disk.h.

bool Fs::Ufs::UFSSwapDir::doubleCheck ( StoreEntry e)
overridevirtual

Reimplemented from Store::Disk.

Definition at line 354 of file UFSSwapDir.cc.

References DBG_CRITICAL, debugs, HERE(), NULL, StoreEntry::swap_file_sz, and StoreEntry::swap_filen.

void Fs::Ufs::UFSSwapDir::dump ( StoreEntry entry) const
overridevirtual

Reimplemented from Store::Disk.

Definition at line 1250 of file UFSSwapDir.cc.

References PRIu64, and storeAppendPrintf().

void Fs::Ufs::UFSSwapDir::dumpEntry ( StoreEntry e) const
private

Definition at line 346 of file UFSSwapDir.cc.

References DBG_CRITICAL, debugs, StoreEntry::dump(), HERE(), NULL, and StoreEntry::swap_filen.

void Store::Disk::dumpOptions ( StoreEntry e) const
protectedinherited

Definition at line 307 of file Disk.cc.

References ConfigOption::dump().

void Fs::Ufs::UFSSwapDir::evictCached ( StoreEntry e)
overridevirtual

Prevent new get() calls from returning the matching entry. If the matching entry is unused, it may be removed from the store now. The store entry is matched using either e attachment info or e.key.

Implements Store::Storage.

Definition at line 1202 of file UFSSwapDir.cc.

References debugs, StoreEntry::detachFromDisk(), StoreEntry::hasDisk(), StoreEntry::locked(), n_disk_objects, StoreEntry::swap_file_sz, StoreEntry::swap_filen, StoreEntry::swappedOut(), and unlinkFile().

void Fs::Ufs::UFSSwapDir::evictIfFound ( const cache_key )
overridevirtual

An evictCached() equivalent for callers that did not get() a StoreEntry. Callers with StoreEntry objects must use evictCached() instead.

Implements Store::Storage.

Definition at line 1222 of file UFSSwapDir.cc.

bool Fs::Ufs::UFSSwapDir::FilenoBelongsHere ( int  fn,
int  cachedir,
int  level1dir,
int  level2dir 
)
static

check whether swapfile belongs to the specified cachedir/l1dir/l2dir

Parameters
cachedirthe number of the cachedir which is being tested
level1dirlevel-1 dir in the cachedir
level2dirlevel-2 dir

Definition at line 1138 of file UFSSwapDir.cc.

References assert, SquidConfig::cacheSwap, Config, fn, INDEXSD, IsUFSDir(), l1, l2, and Store::DiskConfig::n_configured.

Referenced by DirClean(), and Fs::Ufs::RebuildState::getNextFile().

void Fs::Ufs::UFSSwapDir::finalizeSwapoutFailure ( StoreEntry )
overridevirtual

Implements Store::Disk.

Definition at line 1297 of file UFSSwapDir.cc.

References debugs.

void Fs::Ufs::UFSSwapDir::finalizeSwapoutSuccess ( const StoreEntry )
overridevirtual

Implements Store::Disk.

Definition at line 1290 of file UFSSwapDir.cc.

References n_disk_objects, and StoreEntry::swap_file_sz.

char * Fs::Ufs::UFSSwapDir::fullPath ( sfileno  filn,
char *  fullpath 
) const

Definition at line 1257 of file UFSSwapDir.cc.

References LOCAL_ARRAY, and MAXPATHLEN.

StoreEntry * Store::Disk::get ( const cache_key )
overridevirtualinherited
Returns
a possibly unlocked/unregistered stored entry with key (or nil) The returned entry might not match the caller's Store ID or method. The caller must abandon()/release() the entry or register it with Root(). This method must not trigger slow I/O operations (e.g., disk swap in).

Implements Store::Controlled.

Reimplemented in Rock::SwapDir.

Definition at line 393 of file Disk.cc.

References NULL.

Referenced by Store::Disks::get().

ConfigOption * Fs::Ufs::UFSSwapDir::getOptionTree ( ) const
overridevirtual

Reimplemented from Store::Disk.

Definition at line 255 of file UFSSwapDir.cc.

References Store::Disk::getOptionTree(), NULL, optionIODump(), and optionIOParse().

void Store::Disk::getStats ( StoreInfoStats stats) const
overridevirtualinherited
int Fs::Ufs::UFSSwapDir::HandleCleanEvent ( )
staticprivate
virtual bool Fs::Ufs::UFSSwapDir::hasReadableEntry ( const StoreEntry ) const
inlineoverridevirtual

as long as ufs relies on the global store_table to index entries, it is wrong to ask individual ufs cache_dirs whether they have an entry

Implements Store::Disk.

Definition at line 78 of file UFSSwapDir.h.

void Fs::Ufs::UFSSwapDir::init ( )
overridevirtual

Start preparing the store for use. To check readiness, callers should use readable() and writable() methods.

Implements Store::Storage.

Definition at line 277 of file UFSSwapDir.cc.

References debugs, eventAdd(), fatal(), fsBlockSize(), HERE(), and NULL.

bool Fs::Ufs::UFSSwapDir::IsUFSDir ( SwapDir sd)
static

Definition at line 1126 of file UFSSwapDir.cc.

Referenced by FilenoBelongsHere(), and HandleCleanEvent().

char * Fs::Ufs::UFSSwapDir::logFile ( char const *  ext = NULL) const
private

Definition at line 694 of file UFSSwapDir.cc.

References Config, LOCAL_ARRAY, SquidConfig::Log, MAXPATHLEN, NULL, SquidConfig::swap, and xstrncpy().

int Fs::Ufs::UFSSwapDir::mapBitAllocate ( )

Definition at line 590 of file UFSSwapDir.cc.

References fn.

void Fs::Ufs::UFSSwapDir::mapBitReset ( sfileno  filn)

Definition at line 575 of file UFSSwapDir.cc.

void Fs::Ufs::UFSSwapDir::mapBitSet ( sfileno  filn)

Definition at line 569 of file UFSSwapDir.cc.

int Fs::Ufs::UFSSwapDir::mapBitTest ( sfileno  filn)

Definition at line 563 of file UFSSwapDir.cc.

Referenced by DirClean().

int64_t Store::Disk::maxObjectSize ( ) const
overridevirtualinherited
void Store::Disk::maxObjectSize ( int64_t  newMax)
inherited

configure the maximum object size for this storage area. May be any size up to the total storage area.

Definition at line 115 of file Disk.cc.

References DBG_PARSE_NOTE, and debugs.

virtual uint64_t Store::Disk::maxSize ( ) const
inlineoverridevirtualinherited

The maximum size the store will support in normal use. Inaccuracy is permitted, but may throw estimates for memory etc out of whack.

Implements Store::Storage.

Reimplemented in TestSwapDir.

Definition at line 48 of file Disk.h.

References Store::Disk::max_size.

Referenced by storeDirSelectSwapDirLeastLoad().

int64_t Store::Disk::minObjectSize ( ) const
inherited

Definition at line 96 of file Disk.cc.

References Config, SquidConfig::minObjectSize, and SquidConfig::Store.

uint64_t Store::Disk::minSize ( ) const
overridevirtualinherited

Implements Store::Storage.

Definition at line 89 of file Disk.cc.

References Config, SquidConfig::lowWaterMark, and SquidConfig::Swap.

bool Store::Disk::needsDiskStrand ( ) const
virtualinherited

Reimplemented in Rock::SwapDir.

Definition at line 249 of file Disk.cc.

Referenced by configDoConfigure().

bool Store::Disk::objectSizeIsAcceptable ( int64_t  objSize) const
inherited

whether we can store an object of the given size negative objSize means the object size is currently unknown

Definition at line 156 of file Disk.cc.

References assert.

void Fs::Ufs::UFSSwapDir::openLog ( )
overridevirtual
StoreIOState::Pointer Fs::Ufs::UFSSwapDir::openStoreIO ( StoreEntry e,
StoreIOState::STFNCB file_callback,
StoreIOState::STIOCB aCallback,
void *  callback_data 
)
overridevirtual

Implements Store::Disk.

Definition at line 557 of file UFSSwapDir.cc.

void Fs::Ufs::UFSSwapDir::optionIODump ( StoreEntry e) const
private

Definition at line 249 of file UFSSwapDir.cc.

References storeAppendPrintf().

Referenced by getOptionTree().

bool Fs::Ufs::UFSSwapDir::optionIOParse ( char const *  option,
const char *  value,
int  reconfiguring 
)
private

Definition at line 222 of file UFSSwapDir.cc.

References DiskIOModule::Find(), and self_destruct().

Referenced by getOptionTree().

void Fs::Ufs::UFSSwapDir::parse ( int  index,
char *  path 
)
overridevirtual
void Store::Disk::parseOptions ( int  reconfiguring)
protectedinherited
void Fs::Ufs::UFSSwapDir::parseSizeL1L2 ( )
private

Definition at line 148 of file UFSSwapDir.cc.

References DBG_IMPORTANT, debugs, fatal(), GetInteger(), i, reconfiguring, and size.

bool Fs::Ufs::UFSSwapDir::pathIsDirectory ( const char *  path) const
private

Definition at line 634 of file UFSSwapDir.cc.

References DBG_CRITICAL, debugs, and xstrerr().

void Fs::Ufs::UFSSwapDir::rebuild ( )
private
void Fs::Ufs::UFSSwapDir::reconfigure ( )
overridevirtual

Implements Store::Disk.

Definition at line 178 of file UFSSwapDir.cc.

void Fs::Ufs::UFSSwapDir::reference ( StoreEntry e)
overridevirtual

Reimplemented from Store::Disk.

Definition at line 529 of file UFSSwapDir.cc.

References debugs, HERE(), StoreEntry::repl, StoreEntry::swap_dirn, and StoreEntry::swap_filen.

void Fs::Ufs::UFSSwapDir::replacementAdd ( StoreEntry e)

Add and remove the given StoreEntry from the replacement policy in use

Definition at line 1229 of file UFSSwapDir.cc.

References debugs, HERE(), and StoreEntry::repl.

void Fs::Ufs::UFSSwapDir::replacementRemove ( StoreEntry e)
int64_t Store::Disk::sizeInBlocks ( const int64_t  size) const
inlineprotectedinherited

Definition at line 86 of file Disk.h.

References Store::Disk::fs.

virtual bool Fs::Ufs::UFSSwapDir::smpAware ( ) const
inlineoverridevirtual

whether this storage is capable of serving multiple workers; a true result does not imply [lack of] non-SMP support because [only] some SMP-aware storages also support non-SMP configss

Reimplemented from Store::Disk.

Definition at line 75 of file UFSSwapDir.h.

void Store::Disk::stat ( StoreEntry e) const
overridevirtualinherited

Output stats to the provided store entry.

Todo:
make these calls asynchronous

Implements Store::Storage.

Reimplemented in TestSwapDir.

Definition at line 63 of file Disk.cc.

References storeAppendPrintf(), and type.

void Fs::Ufs::UFSSwapDir::statfs ( StoreEntry sentry) const
overridevirtual

Reimplemented from Store::Disk.

Definition at line 376 of file UFSSwapDir.cc.

References Math::doublePercent(), fsStats(), Math::intPercent(), PRIu64, and storeAppendPrintf().

char * Fs::Ufs::UFSSwapDir::swapSubDir ( int  subdirn) const

Definition at line 600 of file UFSSwapDir.cc.

References assert, LOCAL_ARRAY, and MAXPATHLEN.

void Fs::Ufs::UFSSwapDir::sync ( void  )
overridevirtual

Reimplemented from Store::Storage.

Definition at line 1284 of file UFSSwapDir.cc.

char const * Store::Disk::type ( ) const
inherited

Definition at line 230 of file Disk.cc.

Referenced by dump_cachedir(), and parse_cachedir().

bool Fs::Ufs::UFSSwapDir::unlinkdUseful ( ) const
overridevirtual

Implements Store::Disk.

Definition at line 1195 of file UFSSwapDir.cc.

References IamWorkerProcess().

void Fs::Ufs::UFSSwapDir::unlinkFile ( sfileno  f)

Definition at line 1185 of file UFSSwapDir.cc.

References debugs, HERE(), and NULL.

Referenced by evictCached().

virtual bool Store::Controlled::updateAnchored ( StoreEntry )
inlinevirtualinherited

Update a local Transients entry with fresh info from this cache (if any). Return true iff the cache supports Transients entries and the given local Transients entry is now in sync with this storage.

Reimplemented in Rock::SwapDir, MemStore, and Store::Disks.

Definition at line 45 of file Controlled.h.

virtual void Store::Controlled::updateHeaders ( StoreEntry )
inlinevirtualinherited

Reimplemented in Rock::SwapDir, MemStore, and Store::Disks.

Definition at line 35 of file Controlled.h.

Referenced by Store::Disks::updateHeaders().

int Fs::Ufs::UFSSwapDir::validFileno ( sfileno  filn,
int  flag 
) const

Definition at line 1168 of file UFSSwapDir.cc.

Referenced by DirClean().

bool Fs::Ufs::UFSSwapDir::validL1 ( int  anInt) const

Definition at line 777 of file UFSSwapDir.cc.

bool Fs::Ufs::UFSSwapDir::validL2 ( int  anInt) const

Definition at line 783 of file UFSSwapDir.cc.

bool Fs::Ufs::UFSSwapDir::verifyCacheDirs ( )
private

Verify that the the CacheDir exists

If this returns < 0, then Squid exits, complains about swap directories not existing, and instructs the admin to run 'squid -z' Called by UFSSwapDir::init

Definition at line 654 of file UFSSwapDir.cc.

Member Data Documentation

int Store::Disk::blksize
inherited

Definition at line 145 of file Disk.h.

void Fs::Ufs::UFSSwapDir::CleanEvent
staticprivate

Definition at line 130 of file UFSSwapDir.h.

CleanLog* Store::Disk::cleanLog
inherited

Definition at line 139 of file Disk.h.

Referenced by storeDirWriteCleanLogs(), and UFSCleanLog::write().

uint64_t Fs::Ufs::UFSSwapDir::cur_size
private

Definition at line 149 of file UFSSwapDir.h.

Referenced by currentSize().

ConfigOptionVector* Fs::Ufs::UFSSwapDir::currentIOOptions
mutableprivate

Definition at line 147 of file UFSSwapDir.h.

int Store::Disk::disker
inherited

Definition at line 103 of file Disk.h.

Referenced by configDoConfigure().

struct Store::Disk::Flags Store::Disk::flags
inherited
struct { ... } Store::Disk::fs
void* Fs::Ufs::UFSSwapDir::fsdata

Definition at line 109 of file UFSSwapDir.h.

int Store::Disk::index
inherited

Definition at line 102 of file Disk.h.

Referenced by storeDirWriteCleanLogs(), and Fs::Ufs::UFSStoreState::UFSStoreState().

Fs::Ufs::UFSStrategy* Fs::Ufs::UFSSwapDir::IO
char const* Fs::Ufs::UFSSwapDir::ioType
private

Definition at line 148 of file UFSSwapDir.h.

int Fs::Ufs::UFSSwapDir::l1
protected

Definition at line 121 of file UFSSwapDir.h.

Referenced by DirClean(), FilenoBelongsHere(), and HandleCleanEvent().

int Fs::Ufs::UFSSwapDir::l2
protected

Definition at line 122 of file UFSSwapDir.h.

Referenced by DirClean(), FilenoBelongsHere(), and HandleCleanEvent().

FileMap* Fs::Ufs::UFSSwapDir::map
protected

Definition at line 119 of file UFSSwapDir.h.

int64_t Store::Disk::max_objsize
protectedinherited

Definition at line 98 of file Disk.h.

uint64_t Store::Disk::max_size
protectedinherited

Definition at line 96 of file Disk.h.

Referenced by Store::Disk::maxSize().

int64_t Store::Disk::min_objsize
protectedinherited

Definition at line 97 of file Disk.h.

uint64_t Fs::Ufs::UFSSwapDir::n_disk_objects
private

Definition at line 150 of file UFSSwapDir.h.

Referenced by currentCount().

int Fs::Ufs::UFSSwapDir::NumberOfUFSDirs = 0
staticprivate

Definition at line 126 of file UFSSwapDir.h.

char* Store::Disk::path
inherited

Definition at line 101 of file Disk.h.

Referenced by DirClean(), dump_cachedir(), and parse_cachedir().

bool Fs::Ufs::UFSSwapDir::rebuilding_
private

Definition at line 151 of file UFSSwapDir.h.

int Store::Disk::removals
inherited

Definition at line 105 of file Disk.h.

RemovalPolicy* Store::Disk::repl
inherited

Definition at line 104 of file Disk.h.

int Store::Disk::scanned
inherited

Definition at line 106 of file Disk.h.

int Fs::Ufs::UFSSwapDir::suggest
protected

Definition at line 120 of file UFSSwapDir.h.

int Fs::Ufs::UFSSwapDir::swaplog_fd
private

Definition at line 129 of file UFSSwapDir.h.

int * Fs::Ufs::UFSSwapDir::UFSDirToGlobalDirMapping = NULL
staticprivate

Definition at line 127 of file UFSSwapDir.h.


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors