|
Squid Web Cache master
|
#include <UFSSwapDir.h>
Public Types | |
| typedef RefCount< Disk > | Pointer |
Public Member Functions | |
| UFSSwapDir (char const *aType, const char *aModuleType) | |
| ~UFSSwapDir () override | |
| void | create () override |
| create system resources needed for this store to operate in the future | |
| void | init () override |
| void | dump (StoreEntry &) const override |
| bool | doubleCheck (StoreEntry &) override |
| bool | unlinkdUseful () const override |
| whether SwapDir may benefit from unlinkd | |
| void | statfs (StoreEntry &) const override |
| void | maintain () override |
| perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain | |
| void | evictCached (StoreEntry &) override |
| void | evictIfFound (const cache_key *) override |
| 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 | |
| void | reference (StoreEntry &) override |
| somebody needs this entry (many cache replacement policies need to know) | |
| bool | dereference (StoreEntry &) override |
| StoreIOState::Pointer | createStoreIO (StoreEntry &, StoreIOState::STIOCB *, void *) override |
| StoreIOState::Pointer | openStoreIO (StoreEntry &, StoreIOState::STIOCB *, void *) override |
| void | openLog () override |
| void | closeLog () override |
| int | writeCleanStart () override |
| void | writeCleanDone () override |
| void | logEntry (const StoreEntry &e, int op) const override |
| void | parse (int index, char *path) override |
| void | reconfigure () override |
| int | callback () override |
| called once every main loop iteration; TODO: Move to UFS code. | |
| void | sync () override |
| prepare for shutdown | |
| void | finalizeSwapoutSuccess (const StoreEntry &) override |
| finalize the successful swapout that has been already noticed by Store | |
| void | finalizeSwapoutFailure (StoreEntry &) override |
| abort the failed swapout that has been already noticed by Store | |
| uint64_t | currentSize () const override |
| current size | |
| uint64_t | currentCount () const override |
| the total number of objects stored right now | |
| ConfigOption * | getOptionTree () const override |
| bool | smpAware () const override |
| whether this disk storage is capable of serving multiple workers | |
| 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) |
| StoreEntry * | 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) |
| 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 | |
| virtual bool | active () const |
| virtual bool | doReportStat () const |
| whether stat should be reported by this SwapDir | |
| virtual void | diskFull () |
| StoreEntry * | get (const cache_key *) override |
| uint64_t | maxSize () const override |
| uint64_t | minSize () const override |
| the minimum size the store will shrink to via normal housekeeping | |
| int64_t | maxObjectSize () const override |
| the maximum size of a storable object; -1 if unlimited | |
| void | maxObjectSize (int64_t newMax) |
| void | getStats (StoreInfoStats &stats) const override |
| collect statistics | |
| void | stat (StoreEntry &) const override |
| int64_t | minObjectSize () const |
| the size of the smallest entry this cache_dir can store | |
| bool | objectSizeIsAcceptable (int64_t objSize) const |
| virtual void | disconnect (StoreEntry &) |
| called when the entry is about to forget its association with cache_dir | |
| bool | canLog (StoreEntry const &e) const |
| virtual void | updateHeaders (StoreEntry *) |
| make stored metadata and HTTP headers the same as in the given entry | |
| virtual bool | anchorToCache (StoreEntry &) |
| 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::UFSStrategy * | IO | |
| void * | fsdata | |
| char * | path | |
| int | index | |
| int | disker | |
| disker kid id dedicated to this SwapDir or -1 | ||
| RemovalPolicy * | repl | |
| int | removals | |
| int | scanned | |
| struct Store::Disk::Flags | flags | |
| CleanLog * | cleanLog | |
| 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 | |
| FileMap * | map |
| int | suggest |
| int | l1 |
| int | l2 |
| uint64_t | max_size |
| maximum allocatable size of the storage area | |
| int64_t | min_objsize |
| minimum size of any object stored here (-1 for no limit) | |
| int64_t | max_objsize |
| maximum size of any object stored here (-1 for no limit) | |
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 |
| SBuf | logFile (char const *ext=nullptr) const |
| void | changeIO (DiskIOModule *) |
| bool | optionIOParse (char const *option, const char *value, int reconfiguring) |
| void | optionIODump (StoreEntry *e) const |
| bool | optionReadOnlyParse (char const *option, const char *value, int reconfiguring) |
| void | optionReadOnlyDump (StoreEntry *e) const |
| bool | optionObjectSizeParse (char const *option, const char *value, int reconfiguring) |
| void | optionObjectSizeDump (StoreEntry *e) const |
Static Private Member Functions | |
| static int | HandleCleanEvent () |
| safely cleans a few unused files if possible | |
Private Attributes | |
| int | swaplog_fd |
| ConfigOptionVector * | currentIOOptions |
| char const * | ioType |
| uint64_t | cur_size |
| currently used space in the storage area | |
| uint64_t | n_disk_objects |
| total number of objects stored | |
| bool | rebuilding_ |
| whether RebuildState is writing the new swap.state | |
| char const * | theType |
Static Private Attributes | |
| static size_t | NumberOfUFSDirs = 0 |
| static int * | UFSDirToGlobalDirMapping = nullptr |
| static EVH | CleanEvent |
Definition at line 30 of file UFSSwapDir.h.
|
inherited |
| Fs::Ufs::UFSSwapDir::UFSSwapDir | ( | char const * | aType, |
| const char * | aModuleType | ||
| ) |
Definition at line 307 of file UFSSwapDir.cc.
References DiskIOModule::Find(), and IO.
|
override |
Definition at line 328 of file UFSSwapDir.cc.
References file_close(), and xfree.
|
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::Disk::doReportStat().
| 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 | ||
| ) |
Add a new object to the cache with empty memory copy and pointer to disk
This method is used to rebuild a store from disk
Definition at line 788 of file UFSSwapDir.cc.
References asHex(), StoreEntry::attachToDisk(), debugs, EBIT_CLR, ENTRY_VALIDATED, StoreEntry::expires, StoreEntry::flags, StoreEntry::hashInsert(), StoreEntry::lastModified(), StoreEntry::lastref, n_disk_objects, NOT_IN_MEMORY, PING_NONE, StoreEntry::ping_status, StoreEntry::refcount, StoreEntry::setMemStatus(), STORE_OK, StoreEntry::store_status, storeKeyText(), StoreEntry::swap_file_sz, StoreEntry::swap_filen, SWAPOUT_DONE, and StoreEntry::timestamp.
|
inlineprotectedvirtualinherited |
Reimplemented in Rock::SwapDir.
Definition at line 85 of file Disk.h.
Referenced by Rock::SwapDir::allowOptionReconfigure().
|
inlinevirtualinherited |
tie StoreEntry to this storage if this storage has a matching entry
| true | if this storage has a matching entry |
Reimplemented in Rock::SwapDir, MemStore, and Store::Disks.
Definition at line 39 of file Controlled.h.
Referenced by Store::Disks::anchorToCache().
|
overridevirtual |
Reimplemented from Store::Storage.
Definition at line 1256 of file UFSSwapDir.cc.
|
inherited |
Definition at line 188 of file Disk.cc.
References EBIT_TEST, ENTRY_SPECIAL, StoreEntry::flags, StoreEntry::hasDisk(), KEY_PRIVATE, RELEASE_REQUEST, StoreEntry::swap_file_sz, and StoreEntry::swappedOut().
|
overridevirtual |
Implements Store::Disk.
Definition at line 115 of file UFSSwapDir.cc.
References Store::Disk::canStore(), IO, Fs::Ufs::UFSStrategy::load(), and Fs::Ufs::UFSStrategy::shedLoad().
|
private |
Definition at line 194 of file UFSSwapDir.cc.
References safe_free, DiskIOModule::type(), and xstrdup.
|
overridevirtual |
Reimplemented from Store::Disk.
Definition at line 755 of file UFSSwapDir.cc.
References assert, debugs, file_close(), and safe_free.
| void Fs::Ufs::UFSSwapDir::closeTmpSwapLog | ( | ) |
Definition at line 831 of file UFSSwapDir.cc.
References assert, SBuf::c_str(), DBG_IMPORTANT, debugs, fatalf(), file_close(), file_open(), FileRename(), O_BINARY, SQUIDSBUFPH, SQUIDSBUFPRINT, and xstrerr().
|
overridevirtual |
Implements Store::Storage.
Definition at line 300 of file UFSSwapDir.cc.
References debugs.
Referenced by TestUfs::testUfsSearch().
Definition at line 604 of file UFSSwapDir.cc.
References DBG_IMPORTANT, debugs, fatalf(), getCurrentTime(), and xstrerr().
|
overridevirtual |
Implements Store::Disk.
Definition at line 546 of file UFSSwapDir.cc.
|
private |
Definition at line 665 of file UFSSwapDir.cc.
References DBG_IMPORTANT, debugs, LOCAL_ARRAY, and MAXPATHLEN.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
overridevirtual |
somebody no longer needs this entry (usually after calling reference()) return false iff the idle entry should be destroyed
Implements Store::Controlled.
Definition at line 534 of file UFSSwapDir.cc.
References debugs, StoreEntry::repl, StoreEntry::swap_dirn, and StoreEntry::swap_filen.
Definition at line 1312 of file UFSSwapDir.cc.
References SBuf::appendf(), asHex(), assert, SBuf::c_str(), DBG_CRITICAL, debugs, FilenoBelongsHere(), StatCounters::files_cleaned, INDEXSD, l1, l2, mapBitTest(), MYNAME, Store::Disk::path, rev_int_sort(), safeunlink(), statCounter, StatCounters::swap, validFileno(), and xstrerr().
|
inlinevirtualinherited |
Reimplemented in Rock::SwapDir.
Definition at line 71 of file Disk.h.
Referenced by storeGetPublic().
|
virtualinherited |
Notify this disk that it is full. 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().
|
inlinevirtualinherited |
Reimplemented in Rock::SwapDir.
Definition at line 35 of file Disk.h.
References Store::Disk::active().
|
overridevirtual |
Reimplemented from Store::Disk.
Definition at line 349 of file UFSSwapDir.cc.
References DBG_CRITICAL, debugs, StoreEntry::swap_file_sz, and StoreEntry::swap_filen.
|
overridevirtual |
Reimplemented from Store::Disk.
Definition at line 1228 of file UFSSwapDir.cc.
References PRIu64, and storeAppendPrintf().
|
private |
Definition at line 341 of file UFSSwapDir.cc.
References asHex(), DBG_CRITICAL, debugs, StoreEntry::dump(), and StoreEntry::swap_filen.
|
protectedinherited |
Definition at line 307 of file Disk.cc.
References ConfigOption::dump().
|
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 1178 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().
|
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 1200 of file UFSSwapDir.cc.
|
static |
check whether swapfile belongs to the specified cachedir/l1dir/l2dir
| cachedir | the number of the cachedir which is being tested |
| level1dir | level-1 dir in the cachedir |
| level2dir | level-2 dir |
Definition at line 1114 of file UFSSwapDir.cc.
References assert, SquidConfig::cacheSwap, Config, F1, F2, INDEXSD, IsUFSDir(), l1, l2, and Store::DiskConfig::n_configured.
Referenced by DirClean(), and Fs::Ufs::RebuildState::getNextFile().
|
overridevirtual |
|
overridevirtual |
Implements Store::Disk.
Definition at line 1268 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 1235 of file UFSSwapDir.cc.
References LOCAL_ARRAY, and MAXPATHLEN.
|
overridevirtualinherited |
Implements Store::Controlled.
|
overridevirtual |
Reimplemented from Store::Disk.
Definition at line 250 of file UFSSwapDir.cc.
References Store::Disk::getOptionTree(), optionIODump(), and optionIOParse().
|
overridevirtualinherited |
Implements Store::Storage.
Definition at line 52 of file Disk.cc.
References StoreInfoStats::Part::capacity, StoreInfoStats::Part::count, StoreInfoStats::Part::size, and StoreInfoStats::swap.
|
staticprivate |
Definition at line 1039 of file UFSSwapDir.cc.
References assert, SquidConfig::cacheSwap, Config, INDEXSD, IsUFSDir(), l1, l2, Store::DiskConfig::n_configured, RandomSeed32(), Store::Controller::store_dirs_rebuilding, and xcalloc().
|
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.
|
overridevirtual |
Start preparing the store for use. To check readiness, callers should use readable() and writable() methods.
Implements Store::Storage.
Definition at line 272 of file UFSSwapDir.cc.
References debugs, eventAdd(), fatal(), and fsBlockSize().
|
static |
Definition at line 1102 of file UFSSwapDir.cc.
Referenced by FilenoBelongsHere(), and HandleCleanEvent().
|
overridevirtual |
Reimplemented from Store::Disk.
Definition at line 1283 of file UFSSwapDir.cc.
References debugs, StoreEntry::expires, StoreSwapLogData::expires, file_write(), StoreSwapLogData::finalize(), StoreEntry::flags, StoreSwapLogData::flags, FreeObject(), hash_link::key, StoreSwapLogData::key, StoreSwapLogData::lastmod, StoreEntry::lastModified(), StoreEntry::lastref, StoreSwapLogData::lastref, StoreSwapLogData::op, StoreEntry::refcount, StoreSwapLogData::refcount, SQUID_MD5_DIGEST_LENGTH, StoreEntry::swap_file_sz, StoreSwapLogData::swap_file_sz, StoreEntry::swap_filen, StoreSwapLogData::swap_filen, StoreEntry::timestamp, and StoreSwapLogData::timestamp.
|
private |
Definition at line 689 of file UFSSwapDir.cc.
References SBuf::append(), SBuf::appendf(), SBuf::cmp(), Config, SquidConfig::Log, MAXPATHLEN, SquidConfig::swap, and xstrncpy().
|
overridevirtual |
Implements Store::Storage.
Definition at line 414 of file UFSSwapDir.cc.
References Config, DBG_IMPORTANT, debugs, RemovalPurgeWalker::Done, double, SquidConfig::highWaterMark, int, RemovalPurgeWalker::Next, StoreEntry::release(), squid_curtime, Store::Controller::store_dirs_rebuilding, and SquidConfig::Swap.
| int Fs::Ufs::UFSSwapDir::mapBitAllocate | ( | ) |
Definition at line 585 of file UFSSwapDir.cc.
| void Fs::Ufs::UFSSwapDir::mapBitReset | ( | sfileno | filn | ) |
Definition at line 570 of file UFSSwapDir.cc.
| void Fs::Ufs::UFSSwapDir::mapBitSet | ( | sfileno | filn | ) |
Definition at line 564 of file UFSSwapDir.cc.
Definition at line 558 of file UFSSwapDir.cc.
Referenced by DirClean().
|
overridevirtualinherited |
Implements Store::Storage.
Definition at line 103 of file Disk.cc.
References Config, SquidConfig::maxObjectSize, min(), and SquidConfig::Store.
Referenced by Fs::Ufs::UFSStoreState::write().
|
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.
|
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.
|
inherited |
Definition at line 96 of file Disk.cc.
References Config, SquidConfig::minObjectSize, and SquidConfig::Store.
|
overridevirtualinherited |
Implements Store::Storage.
Definition at line 89 of file Disk.cc.
References Config, SquidConfig::lowWaterMark, and SquidConfig::Swap.
|
virtualinherited |
Reimplemented in Rock::SwapDir.
|
inherited |
|
overridevirtual |
Reimplemented from Store::Disk.
Definition at line 728 of file UFSSwapDir.cc.
References assert, SBuf::c_str(), SquidConfig::cacheSwap, Config, DBG_IMPORTANT, debugs, fatal(), file_open(), IamWorkerProcess(), Store::DiskConfig::n_configured, O_BINARY, and xstrerr().
|
overridevirtual |
Implements Store::Disk.
Definition at line 552 of file UFSSwapDir.cc.
Definition at line 858 of file UFSSwapDir.cc.
References MemBuf::append(), MemBuf::appended(), assert, SBuf::c_str(), MemBuf::content(), MemBuf::contentSize(), DBG_CRITICAL, DBG_IMPORTANT, debugs, fatalf(), file_close(), file_open(), file_write(), MemBuf::freeFunc(), StoreSwapLogHeader::gapSize(), MemBuf::init(), O_BINARY, StoreSwapLogHeader::record_size, safeunlink(), MemBuf::space(), SQUIDSBUFPH, SQUIDSBUFPRINT, and xstrerr().
|
private |
Definition at line 244 of file UFSSwapDir.cc.
References storeAppendPrintf().
Referenced by getOptionTree().
|
private |
Definition at line 217 of file UFSSwapDir.cc.
References self_destruct().
Referenced by getOptionTree().
|
privateinherited |
Definition at line 382 of file Disk.cc.
References PRId64, and storeAppendPrintf().
Referenced by Store::Disk::getOptionTree().
|
privateinherited |
Definition at line 347 of file Disk.cc.
References DBG_IMPORTANT, debugs, self_destruct(), size, and strtoll().
Referenced by Store::Disk::getOptionTree().
|
privateinherited |
Definition at line 340 of file Disk.cc.
References storeAppendPrintf().
Referenced by Store::Disk::getOptionTree().
|
privateinherited |
Definition at line 318 of file Disk.cc.
References DBG_PARSE_NOTE, debugs, and xatoi().
Referenced by Store::Disk::getOptionTree().
|
overridevirtual |
Implements Store::Disk.
Definition at line 180 of file UFSSwapDir.cc.
References Config, createRemovalPolicy(), SquidConfig::replPolicy, and xstrdup.
Referenced by TestUfs::testUfsDefaultEngine(), and TestUfs::testUfsSearch().
|
protectedinherited |
Definition at line 267 of file Disk.cc.
References DBG_IMPORTANT, debugs, ConfigParser::NextToken(), ConfigOption::parse(), and self_destruct().
|
private |
Definition at line 143 of file UFSSwapDir.cc.
References DBG_IMPORTANT, debugs, fatal(), GetInteger(), reconfiguring, and size.
|
private |
Definition at line 629 of file UFSSwapDir.cc.
References DBG_CRITICAL, debugs, and xstrerr().
|
private |
Definition at line 825 of file UFSSwapDir.cc.
References eventAdd(), and Fs::Ufs::RebuildState::RebuildStep.
|
overridevirtual |
Implements Store::Disk.
Definition at line 173 of file UFSSwapDir.cc.
|
overridevirtual |
Implements Store::Controlled.
Definition at line 524 of file UFSSwapDir.cc.
References debugs, 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 1207 of file UFSSwapDir.cc.
References debugs, and StoreEntry::repl.
| void Fs::Ufs::UFSSwapDir::replacementRemove | ( | StoreEntry * | e | ) |
Definition at line 1214 of file UFSSwapDir.cc.
References assert, debugs, RefCount< C >::getRaw(), StoreEntry::hasDisk(), INDEXSD, StoreEntry::repl, and StoreEntry::swap_dirn.
|
inlineprotectedinherited |
Definition at line 87 of file Disk.h.
References Store::Disk::fs, and size.
|
inlineoverridevirtual |
Implements Store::Disk.
Definition at line 75 of file UFSSwapDir.h.
|
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().
|
overridevirtual |
Reimplemented from Store::Disk.
Definition at line 371 of file UFSSwapDir.cc.
References Math::doublePercent(), fsStats(), Math::intPercent(), PRIu64, and storeAppendPrintf().
| char * Fs::Ufs::UFSSwapDir::swapSubDir | ( | int | subdirn | ) | const |
Definition at line 595 of file UFSSwapDir.cc.
References assert, LOCAL_ARRAY, and MAXPATHLEN.
|
overridevirtual |
Reimplemented from Store::Storage.
Definition at line 1262 of file UFSSwapDir.cc.
|
overridevirtual |
Implements Store::Disk.
Definition at line 1171 of file UFSSwapDir.cc.
References IamWorkerProcess().
| void Fs::Ufs::UFSSwapDir::unlinkFile | ( | sfileno | f | ) |
Definition at line 1162 of file UFSSwapDir.cc.
References asHex(), and debugs.
Referenced by evictCached().
|
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 44 of file Controlled.h.
Referenced by Store::Disks::updateAnchored().
|
inlinevirtualinherited |
Reimplemented in Store::Disks, Rock::SwapDir, and MemStore.
Definition at line 35 of file Controlled.h.
Referenced by Store::Disks::updateHeaders().
Definition at line 1145 of file UFSSwapDir.cc.
Referenced by DirClean().
| bool Fs::Ufs::UFSSwapDir::validL1 | ( | int | anInt | ) | const |
Definition at line 776 of file UFSSwapDir.cc.
| bool Fs::Ufs::UFSSwapDir::validL2 | ( | int | anInt | ) | const |
Definition at line 782 of file UFSSwapDir.cc.
|
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 649 of file UFSSwapDir.cc.
|
overridevirtual |
Reimplemented from Store::Disk.
Definition at line 976 of file UFSSwapDir.cc.
References SBuf::c_str(), UFSCleanLog::cln, UFSCleanLog::cur, DBG_CRITICAL, debugs, RemovalPolicyWalker::Done, UFSCleanLog::fd, FD_WRITE_METHOD(), file_close(), file_open(), FileRename(), MYNAME, UFSCleanLog::newLog, O_BINARY, UFSCleanLog::outbuf, UFSCleanLog::outbuf_offset, safe_free, Store::Controller::store_dirs_rebuilding, UFSCleanLog::walker, and xstrerr().
|
overridevirtual |
Reimplemented from Store::Disk.
Definition at line 932 of file UFSSwapDir.cc.
References SBuf::append(), SBuf::c_str(), CLEAN_BUF_SZ, UFSCleanLog::cln, UFSCleanLog::cur, debugs, UFSCleanLog::fd, file_open(), StoreSwapLogHeader::gapSize(), UFSCleanLog::newLog, O_BINARY, UFSCleanLog::outbuf, UFSCleanLog::outbuf_offset, StoreSwapLogHeader::record_size, UFSCleanLog::walker, and xcalloc().
|
staticprivate |
Definition at line 130 of file UFSSwapDir.h.
|
inherited |
Definition at line 140 of file Disk.h.
Referenced by UFSCleanLog::write().
|
private |
Definition at line 149 of file UFSSwapDir.h.
Referenced by currentSize().
|
mutableprivate |
Definition at line 147 of file UFSSwapDir.h.
|
inherited |
Referenced by storeDirSelectSwapDirLeastLoad().
| struct { ... } Store::Disk::fs |
Referenced by Store::Disk::Disk(), and Store::Disk::sizeInBlocks().
| void* Fs::Ufs::UFSSwapDir::fsdata |
Definition at line 109 of file UFSSwapDir.h.
|
inherited |
Definition at line 103 of file Disk.h.
Referenced by Fs::Ufs::UFSStoreState::UFSStoreState(), and Rock::Rebuild::Start().
| Fs::Ufs::UFSStrategy* Fs::Ufs::UFSSwapDir::IO |
Definition at line 83 of file UFSSwapDir.h.
Referenced by UFSSwapDir(), canStore(), TestUfs::testUfsDefaultEngine(), and TestUfs::testUfsSearch().
|
private |
Definition at line 148 of file UFSSwapDir.h.
|
protected |
Definition at line 121 of file UFSSwapDir.h.
Referenced by DirClean(), FilenoBelongsHere(), and HandleCleanEvent().
|
protected |
Definition at line 122 of file UFSSwapDir.h.
Referenced by DirClean(), FilenoBelongsHere(), and HandleCleanEvent().
|
protected |
Definition at line 119 of file UFSSwapDir.h.
|
protectedinherited |
Definition at line 97 of file Disk.h.
Referenced by Store::Disk::maxSize().
|
private |
Definition at line 150 of file UFSSwapDir.h.
Referenced by currentCount().
|
staticprivate |
Definition at line 126 of file UFSSwapDir.h.
|
inherited |
Definition at line 102 of file Disk.h.
Referenced by DirClean(), Rock::Rebuild::Stats::Init(), and Rock::Rebuild::Start().
|
private |
Definition at line 151 of file UFSSwapDir.h.
|
inherited |
|
protected |
Definition at line 120 of file UFSSwapDir.h.
|
private |
Definition at line 129 of file UFSSwapDir.h.
|
staticprivate |
Definition at line 127 of file UFSSwapDir.h.