|
Squid Web Cache v8/master
|
#include <RockSwapDir.h>
Public Types | |
| typedef RefCount< SwapDir > | Pointer |
| typedef Ipc::StoreMap | DirMap |
Public Member Functions | |
| SwapDir () | |
| ~SwapDir () override | |
| void | reconfigure () override |
| StoreEntry * | get (const cache_key *key) override |
| void | evictCached (StoreEntry &) override |
| void | evictIfFound (const cache_key *) override |
| void | disconnect (StoreEntry &e) override |
| called when the entry is about to forget its association with cache_dir | |
| uint64_t | currentSize () const override |
| current size | |
| uint64_t | currentCount () const override |
| the total number of objects stored right now | |
| bool | doReportStat () const override |
| 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 | |
| void | create () override |
| create system resources needed for this store to operate in the future | |
| void | parse (int index, char *path) override |
| bool | smpAware () const override |
| whether this disk storage is capable of serving multiple workers | |
| bool | hasReadableEntry (const StoreEntry &) const override |
whether this cache dir has an entry with e.key | |
| SBuf | inodeMapPath () const |
| const char * | freeSlotsPath () const |
| int64_t | entryLimitAbsolute () const |
| Core limit. | |
| int64_t | entryLimitActual () const |
| max number of possible entries in db | |
| int64_t | slotLimitAbsolute () const |
| Rock store implementation limit. | |
| int64_t | slotLimitActual () const |
| total number of slots in this db | |
| bool | validSlotId (const SlotId slotId) const |
| whether the given slot ID may point to a slot in this db | |
| SlotId | reserveSlotForWriting () |
| finds and returns a free db slot to fill or throws | |
| void | purgeSome () |
| purges one or more entries to make full() false and free some slots | |
| int64_t | diskOffset (Ipc::Mem::PageId &pageId) const |
| int64_t | diskOffset (int filen) const |
| void | writeError (StoreIOState &sio) |
| void | noteFreeMapSlice (const Ipc::StoreMapSliceId fileno) override |
| adjust slice-linked state before a locked Readable slice is erased | |
| char const * | type () const |
| virtual bool | active () const |
| 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 | dump (StoreEntry &) const |
| virtual bool | doubleCheck (StoreEntry &) |
| bool | canLog (StoreEntry const &e) const |
| virtual void | openLog () |
| virtual void | closeLog () |
| virtual void | logEntry (const StoreEntry &e, int op) const |
| virtual int | writeCleanStart () |
| virtual void | writeCleanDone () |
| virtual int | callback () |
| called once every main loop iteration; TODO: Move to UFS code. | |
| virtual void | sync () |
| prepare for shutdown | |
| virtual void | readCompleted (const char *buf, int len, int errflag, RefCount< ReadRequest >)=0 |
| virtual void | writeCompleted (int errflag, size_t len, RefCount< WriteRequest >)=0 |
Public Attributes | ||
| uint64_t | slotSize | |
| all db slots are of this size | ||
| 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 | |
| bool | anchorToCache (StoreEntry &) override |
| bool | updateAnchored (StoreEntry &) override |
| bool | needsDiskStrand () const override |
| needs a dedicated kid process | |
| void | init () override |
| ConfigOption * | getOptionTree () const override |
| bool | allowOptionReconfigure (const char *const option) const 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 | |
| StoreIOState::Pointer | createStoreIO (StoreEntry &, StoreIOState::STIOCB *, void *) override |
| StoreIOState::Pointer | openStoreIO (StoreEntry &, StoreIOState::STIOCB *, void *) override |
| void | maintain () override |
| purge while full(); it should be sufficient to purge just one | |
| void | diskFull () override |
| void | reference (StoreEntry &e) override |
| somebody needs this entry (many cache replacement policies need to know) | |
| bool | dereference (StoreEntry &e) override |
| void | updateHeaders (StoreEntry *e) override |
| make stored metadata and HTTP headers the same as in the given entry | |
| bool | unlinkdUseful () const override |
| whether SwapDir may benefit from unlinkd | |
| void | statfs (StoreEntry &e) const override |
| void | ioCompletedNotification () override |
| void | closeCompleted () override |
| void | readCompleted (const char *buf, int len, int errflag, RefCount< ::ReadRequest >) override |
| void | writeCompleted (int errflag, size_t len, RefCount< ::WriteRequest >) override |
| void | parseSize (const bool reconfiguring) |
| parses anonymous cache_dir size option | |
| void | validateOptions () |
| warns of configuration problems; may quit | |
| bool | parseTimeOption (char const *option, const char *value, int reconfiguring) |
| parses time-specific options; mimics SwapDir::optionObjectSizeParse() | |
| void | dumpTimeOption (StoreEntry *e) const |
| reports time-specific options; mimics SwapDir::optionObjectSizeDump() | |
| bool | parseRateOption (char const *option, const char *value, int reconfiguring) |
| parses rate-specific options; mimics SwapDir::optionObjectSizeParse() | |
| void | dumpRateOption (StoreEntry *e) const |
| reports rate-specific options; mimics SwapDir::optionObjectSizeDump() | |
| bool | parseSizeOption (char const *option, const char *value, int reconfiguring) |
| parses size-specific options; mimics SwapDir::optionObjectSizeParse() | |
| void | dumpSizeOption (StoreEntry *e) const |
| reports size-specific options; mimics SwapDir::optionObjectSizeDump() | |
| bool | full () const |
| no more entries can be stored without purging | |
| void | trackReferences (StoreEntry &e) |
| add to replacement policy scope | |
| void | ignoreReferences (StoreEntry &e) |
| delete from repl policy scope | |
| int64_t | diskOffsetLimit () const |
| void | updateHeadersOrThrow (Ipc::StoreMapUpdate &update) |
| StoreIOState::Pointer | createUpdateIO (const Ipc::StoreMapUpdate &, StoreIOState::STIOCB *, void *) |
| void | anchorEntry (StoreEntry &e, const sfileno filen, const Ipc::StoreMapAnchor &anchor) |
| void | parseOptions (int reconfiguring) |
| void | dumpOptions (StoreEntry *e) const |
| int64_t | sizeInBlocks (const int64_t size) const |
Protected Attributes | |
| const char * | filePath |
| location of cache storage file inside path/ | |
| DirMap * | map |
| entry key/sfileno to MaxExtras/inode mapping | |
| 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 | createError (const char *const msg) |
| void | handleWriteCompletionSuccess (const WriteRequest &request) |
| code shared by writeCompleted() success handling cases | |
| void | handleWriteCompletionProblem (const int errflag, const WriteRequest &request) |
| code shared by writeCompleted() error handling cases | |
| 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 |
Private Attributes | |
| DiskIOStrategy * | io |
| RefCount< DiskFile > | theFile |
| cache storage for this cache_dir | |
| Ipc::Mem::Pointer< Ipc::Mem::PageStack > | freeSlots |
| all unused slots | |
| Ipc::Mem::PageId * | waitingForPage |
| one-page cache for a "hot" free slot | |
| DiskFile::Config | fileConfig |
| file-level configuration options | |
| char const * | theType |
Static Private Attributes | |
| static const int64_t | HeaderSize = 16*1024 |
| on-disk db header size | |
Friends | |
| class | Rebuild |
| class | IoState |
| class | HeaderUpdater |
Definition at line 32 of file RockSwapDir.h.
| typedef Ipc::StoreMap Rock::SwapDir::DirMap |
Definition at line 36 of file RockSwapDir.h.
| typedef RefCount<SwapDir> Rock::SwapDir::Pointer |
Definition at line 35 of file RockSwapDir.h.
| Rock::SwapDir::SwapDir | ( | ) |
|
override |
Definition at line 48 of file RockSwapDir.cc.
References ~SwapDir(), and safe_free.
Referenced by ~SwapDir().
|
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().
|
overrideprotectedvirtual |
Reimplemented from Store::Disk.
Definition at line 389 of file RockSwapDir.cc.
References Store::Disk::allowOptionReconfigure().
|
protected |
Definition at line 107 of file RockSwapDir.cc.
References anchorEntry(), StoreEntry::attachToDisk(), Ipc::StoreMapAnchor::complete(), EBIT_SET, ENTRY_VALIDATED, Ipc::StoreMapAnchor::exportInto(), StoreEntry::flags, PING_NONE, StoreEntry::ping_status, STORE_OK, STORE_PENDING, StoreEntry::store_status, SWAPOUT_DONE, and SWAPOUT_WRITING.
Referenced by anchorEntry().
|
overrideprotectedvirtual |
tie StoreEntry to this storage if this storage has a matching entry
| true | if this storage has a matching entry |
Reimplemented from Store::Controlled.
Definition at line 76 of file RockSwapDir.cc.
References Assure, StoreEntry::hasDisk(), and hash_link::key.
|
inlinevirtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir, Store::Controller, and Store::Disks.
|
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().
|
overrideprotectedvirtual |
Implements Store::Disk.
Definition at line 584 of file RockSwapDir.cc.
References Store::Disk::canStore(), debugs, Ipc::Mem::PageId::ioPage, Ipc::Mem::PageLevel(), and Ipc::Mem::PageLimit().
|
overrideprotectedvirtual |
Implements IORequestor.
Definition at line 832 of file RockSwapDir.cc.
References closeCompleted().
Referenced by closeCompleted().
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
Definition at line 215 of file Disk.cc.
Referenced by storeDirCloseSwapLogs().
|
overridevirtual |
Implements Store::Storage.
Definition at line 212 of file RockSwapDir.cc.
References assert, DBG_IMPORTANT, debugs, IamDiskProcess(), Must, O_BINARY, UsingSmp(), xclose(), xopen(), and xwrite().
Referenced by TestRock::setUp().
|
private |
Definition at line 272 of file RockSwapDir.cc.
References createError(), DBG_CRITICAL, debugs, fatal(), and xstrerr().
Referenced by createError().
|
overrideprotectedvirtual |
Implements Store::Disk.
Definition at line 613 of file RockSwapDir.cc.
References asHex(), assert, debugs, Rock::IoState::file(), hash_link::key, Ipc::StoreMapAnchor::set(), StoreIOState::swap_dirn, StoreIOState::swap_filen, and Rock::IoState::writeableAnchor_.
|
protected |
Definition at line 652 of file RockSwapDir.cc.
References Ipc::StoreMapUpdate::Edition::anchor, asHex(), createUpdateIO(), debugs, Ipc::StoreMapUpdate::entry, Rock::IoState::file(), Ipc::StoreMapUpdate::Edition::fileNo, Ipc::StoreMapUpdate::fresh, Must, StoreIOState::swap_dirn, StoreIOState::swap_filen, and Rock::IoState::writeableAnchor_.
Referenced by createUpdateIO().
|
overridevirtual |
Implements Store::Storage.
Definition at line 157 of file RockSwapDir.cc.
Referenced by TestRock::testRockSwapOut().
|
overridevirtual |
Implements Store::Storage.
Definition at line 148 of file RockSwapDir.cc.
|
overrideprotectedvirtual |
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 995 of file RockSwapDir.cc.
References debugs, StoreEntry::repl, StoreEntry::swap_dirn, and StoreEntry::swap_filen.
|
overridevirtual |
Reimplemented from Store::Disk.
Definition at line 121 of file RockSwapDir.cc.
References assert, CollapsedForwarding::Broadcast(), StoreEntry::detachFromDisk(), StoreEntry::hasDisk(), StoreEntry::mem_obj, MemObject::SwapOut::sio, StoreEntry::storeWriterDone(), StoreEntry::swap_filen, MemObject::swapout, and Rock::IoState::writeableAnchor_.
|
overrideprotectedvirtual |
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 from Store::Disk.
Definition at line 970 of file RockSwapDir.cc.
References DBG_IMPORTANT, and debugs.
| int64_t Rock::SwapDir::diskOffset | ( | int | filen | ) | const |
| int64_t Rock::SwapDir::diskOffset | ( | Ipc::Mem::PageId & | pageId | ) | const |
Definition at line 685 of file RockSwapDir.cc.
References assert, diskOffset(), and Ipc::Mem::PageId::number.
Referenced by diskOffset().
|
protected |
Definition at line 692 of file RockSwapDir.cc.
References assert, and diskOffsetLimit().
Referenced by Rock::Rebuild::Rebuild(), and diskOffsetLimit().
|
overridevirtual |
In SMP mode only the disker process reports stats to avoid counting the same stats by multiple processes.
Reimplemented from Store::Disk.
Definition at line 165 of file RockSwapDir.cc.
References IamDiskProcess(), and UsingSmp().
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
Definition at line 46 of file Disk.cc.
Referenced by storeCleanup().
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
|
protectedinherited |
Definition at line 307 of file Disk.cc.
References ConfigOption::dump().
|
protected |
Definition at line 487 of file RockSwapDir.cc.
References dumpRateOption(), and storeAppendPrintf().
Referenced by dumpRateOption().
|
protected |
Definition at line 535 of file RockSwapDir.cc.
References dumpSizeOption(), PRId64, and storeAppendPrintf().
Referenced by dumpSizeOption().
|
protected |
Definition at line 436 of file RockSwapDir.cc.
References dumpTimeOption(), PRId64, and storeAppendPrintf().
Referenced by dumpTimeOption().
|
inline |
Definition at line 62 of file RockSwapDir.h.
References SwapFilenMax.
| int64_t Rock::SwapDir::entryLimitActual | ( | ) | const |
Definition at line 205 of file RockSwapDir.cc.
References entryLimitActual(), and min().
Referenced by Rock::Rebuild::Rebuild(), Rock::Rebuild::Stats::completed(), and entryLimitActual().
|
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 1020 of file RockSwapDir.cc.
References CollapsedForwarding::Broadcast(), debugs, StoreEntry::hasDisk(), StoreEntry::locked(), StoreEntry::publicKey(), and StoreEntry::swap_filen.
|
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 1013 of file RockSwapDir.cc.
|
overridevirtual |
|
overridevirtual |
Implements Store::Disk.
Definition at line 171 of file RockSwapDir.cc.
References assert, StoreEntry::mem_obj, MemObject::SwapOut::sio, MemObject::swapout, and Rock::IoState::writeableAnchor_.
| const char * Rock::SwapDir::freeSlotsPath | ( | ) | const |
Definition at line 1104 of file RockSwapDir.cc.
References String::append(), freeSlotsPath(), and String::termedBuf().
Referenced by freeSlotsPath().
|
protected |
|
overridevirtual |
Implements Store::Controlled.
Definition at line 57 of file RockSwapDir.cc.
References StoreEntry::createMemObject().
|
overrideprotectedvirtual |
Reimplemented from Store::Disk.
Definition at line 370 of file RockSwapDir.cc.
References Store::Disk::getOptionTree(), ConfigOptionVector::options, and vector.
|
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.
|
private |
Definition at line 918 of file RockSwapDir.cc.
References handleWriteCompletionProblem(), Rock::WriteRequest::sidCurrent, and Rock::WriteRequest::sio.
Referenced by handleWriteCompletionProblem().
|
private |
Definition at line 879 of file RockSwapDir.cc.
References assert, DISK_OK, Rock::WriteRequest::eof, handleWriteCompletionSuccess(), WriteRequest::len, Must, Ipc::StoreMapSlice::next, Rock::WriteRequest::sidCurrent, Rock::WriteRequest::sidPrevious, Rock::WriteRequest::sio, and Ipc::StoreMapSlice::size.
Referenced by handleWriteCompletionSuccess().
|
overridevirtual |
|
protected |
Definition at line 1042 of file RockSwapDir.cc.
References debugs, ignoreReferences(), and StoreEntry::repl.
Referenced by ignoreReferences().
|
overrideprotectedvirtual |
Start preparing the store for use. To check readiness, callers should use readable() and writable() methods.
Implements Store::Storage.
Definition at line 281 of file RockSwapDir.cc.
References DBG_CRITICAL, debugs, fatal(), DiskIOModule::Find(), Must, MYNAME, and shm_old.
| SBuf Rock::SwapDir::inodeMapPath | ( | ) | const |
Definition at line 1098 of file RockSwapDir.cc.
References inodeMapPath(), and Ipc::Mem::Segment::Name().
Referenced by inodeMapPath().
|
overrideprotectedvirtual |
Implements IORequestor.
Definition at line 811 of file RockSwapDir.cc.
References debugs, fatalf(), ioCompletedNotification(), Rock::Rebuild::Start(), storeRebuildComplete(), and xstrerr().
Referenced by ioCompletedNotification().
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
Definition at line 227 of file Disk.cc.
Referenced by storeDirSwapLog().
|
overrideprotectedvirtual |
Implements Store::Storage.
Definition at line 978 of file RockSwapDir.cc.
|
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.
|
overrideprotectedvirtual |
Reimplemented from Store::Disk.
Definition at line 312 of file RockSwapDir.cc.
References Config, DiskIOModule::Find(), InDaemonMode(), and SquidConfig::workers.
|
overridevirtual |
Implements Ipc::StoreMapCleaner.
Definition at line 739 of file RockSwapDir.cc.
References Ipc::Mem::PageStack::IdForSwapDirSpace(), noteFreeMapSlice(), Ipc::Mem::PageId::number, and Ipc::Mem::PageId::pool.
Referenced by noteFreeMapSlice().
|
inherited |
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
Definition at line 212 of file Disk.cc.
Referenced by storeDirOpenSwapLogs().
|
overrideprotectedvirtual |
Implements Store::Disk.
Definition at line 754 of file RockSwapDir.cc.
References asHex(), assert, Ipc::StoreMapAnchor::basics, debugs, Rock::IoState::file(), StoreEntry::hasDisk(), Ipc::Mem::PageId::ioPage, Ipc::Mem::PageLevel(), Ipc::Mem::PageLimit(), StoreEntry::publicKey(), Rock::IoState::readableAnchor_, Ipc::StoreMapAnchor::sameKey(), StoreIOState::swap_dirn, Ipc::StoreMapAnchor::Basics::swap_file_sz, StoreEntry::swap_file_sz, StoreEntry::swap_filen, and StoreIOState::swap_filen.
|
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 321 of file RockSwapDir.cc.
References String::append(), assert, String::termedBuf(), and xstrdup.
Referenced by TestRock::setUp().
|
protectedinherited |
Definition at line 267 of file Disk.cc.
References DBG_IMPORTANT, debugs, ConfigParser::NextToken(), ConfigOption::parse(), and self_destruct().
|
protected |
Definition at line 445 of file RockSwapDir.cc.
References DBG_CRITICAL, DBG_IMPORTANT, debugs, parseRateOption(), self_destruct(), and strtoll().
Referenced by parseRateOption().
|
protected |
parse maximum db disk size
Definition at line 353 of file RockSwapDir.cc.
References DBG_IMPORTANT, debugs, fatal(), GetInteger(), and parseSize().
Referenced by parseSize().
|
protected |
Definition at line 495 of file RockSwapDir.cc.
References DBG_CRITICAL, DBG_IMPORTANT, debugs, parseSizeOption(), self_destruct(), and strtoll().
Referenced by parseSizeOption().
|
protected |
Definition at line 397 of file RockSwapDir.cc.
References DBG_CRITICAL, DBG_IMPORTANT, debugs, parseTimeOption(), self_destruct(), and strtoll().
Referenced by parseTimeOption().
| void Rock::SwapDir::purgeSome | ( | ) |
|
overrideprotected |
Definition at line 838 of file RockSwapDir.cc.
References assert, RefCount< C >::getRaw(), Rock::IoState::handleReadCompletion(), readCompleted(), and Rock::ReadRequest::sio.
Referenced by readCompleted().
|
pure virtualinherited |
Implemented in Fs::Ufs::UFSStoreState.
Referenced by MmappedFile::read(), IpcIoFile::readCompleted(), DiskdFile::readDone(), BlockingFile::readDone(), and DiskThreadsDiskFile::readDone().
|
overridevirtual |
Implements Store::Disk.
Definition at line 343 of file RockSwapDir.cc.
|
overrideprotectedvirtual |
Implements Store::Controlled.
Definition at line 987 of file RockSwapDir.cc.
References debugs, StoreEntry::repl, StoreEntry::swap_dirn, and StoreEntry::swap_filen.
| Rock::SlotId Rock::SwapDir::reserveSlotForWriting | ( | ) |
Definition at line 699 of file RockSwapDir.cc.
References assert, debugs, Ipc::Mem::PageId::number, reserveSlotForWriting(), Ipc::Mem::PageId::set(), and TexcHere.
Referenced by reserveSlotForWriting().
|
inlineprotectedinherited |
Definition at line 87 of file Disk.h.
References Store::Disk::fs, and size.
| int64_t Rock::SwapDir::slotLimitAbsolute | ( | ) | const |
Definition at line 187 of file RockSwapDir.cc.
References assert, and slotLimitAbsolute().
Referenced by slotLimitAbsolute().
| int64_t Rock::SwapDir::slotLimitActual | ( | ) | const |
Definition at line 196 of file RockSwapDir.cc.
References max(), min(), and slotLimitActual().
Referenced by Rock::Rebuild::Rebuild(), Rock::Rebuild::Stats::completed(), and slotLimitActual().
|
inlineoverridevirtual |
Implements Store::Disk.
Definition at line 54 of file RockSwapDir.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().
|
overrideprotectedvirtual |
Reimplemented from Store::Disk.
Definition at line 1050 of file RockSwapDir.cc.
References Config, Math::doublePercent(), Ipc::ReadWriteLockStats::dump(), SquidConfig::max_open_disk_fds, PRIu64, store_open_disk_fd, and storeAppendPrintf().
|
inlinevirtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir, Store::Controller, and Store::Disks.
|
protected |
Definition at line 1034 of file RockSwapDir.cc.
References debugs, StoreEntry::repl, and trackReferences().
Referenced by trackReferences().
|
overrideprotectedvirtual |
Implements Store::Disk.
Definition at line 1006 of file RockSwapDir.cc.
|
overrideprotectedvirtual |
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 from Store::Controlled.
Definition at line 94 of file RockSwapDir.cc.
References assert, StoreEntry::hasDisk(), StoreEntry::swap_file_sz, and StoreEntry::swap_filen.
|
overrideprotectedvirtual |
Reimplemented from Store::Controlled.
Definition at line 944 of file RockSwapDir.cc.
References debugs, AsyncJob::Start(), and StoreEntry::swap_filen.
|
protected |
|
protected |
check the results of the configuration; only level-0 debugging works here
Definition at line 542 of file RockSwapDir.cc.
References DBG_CRITICAL, debugs, fatal(), max(), and validateOptions().
Referenced by validateOptions().
| bool Rock::SwapDir::validSlotId | ( | const SlotId | slotId | ) | const |
Definition at line 733 of file RockSwapDir.cc.
References validSlotId().
Referenced by validSlotId().
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
Definition at line 224 of file Disk.cc.
Referenced by storeDirWriteCleanLogs().
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
|
overrideprotected |
Definition at line 847 of file RockSwapDir.cc.
References assert, CollapsedForwarding::Broadcast(), debugs, DISK_ERROR, DISK_OK, StoreIOState::e, Rock::WriteRequest::eof, Rock::IoState::expectedReply(), RefCount< C >::getRaw(), Rock::WriteRequest::id, WriteRequest::len, Rock::WriteRequest::sidCurrent, Rock::WriteRequest::sio, Rock::IoState::stillWaiting(), StoreIOState::swap_filen, StoreIOState::touchingStoreEntry(), and writeCompleted().
Referenced by writeCompleted().
|
pure virtualinherited |
Implemented in Fs::Ufs::UFSStoreState.
Referenced by MmappedFile::write(), IpcIoFile::writeCompleted(), DiskdFile::writeDone(), BlockingFile::writeDone(), and DiskThreadsDiskFile::writeDone().
| void Rock::SwapDir::writeError | ( | StoreIOState & | sio | ) |
Definition at line 930 of file RockSwapDir.cc.
References CollapsedForwarding::Broadcast(), StoreIOState::e, StoreIOState::swap_filen, StoreIOState::touchingStoreEntry(), and writeError().
Referenced by writeError().
|
friend |
Definition at line 134 of file RockSwapDir.h.
|
friend |
Definition at line 133 of file RockSwapDir.h.
|
friend |
Definition at line 132 of file RockSwapDir.h.
|
inherited |
Definition at line 140 of file Disk.h.
Referenced by UFSCleanLog::write().
|
private |
Definition at line 149 of file RockSwapDir.h.
|
protected |
Definition at line 135 of file RockSwapDir.h.
Referenced by Rock::Rebuild::Start().
|
inherited |
Referenced by storeDirSelectSwapDirLeastLoad().
|
private |
Definition at line 145 of file RockSwapDir.h.
| struct { ... } Store::Disk::fs |
Referenced by Store::Disk::Disk(), and Store::Disk::sizeInBlocks().
|
staticprivate |
Definition at line 151 of file RockSwapDir.h.
|
inherited |
Definition at line 103 of file Disk.h.
Referenced by Fs::Ufs::UFSStoreState::UFSStoreState(), and Rock::Rebuild::Start().
|
private |
Definition at line 143 of file RockSwapDir.h.
|
protected |
Definition at line 136 of file RockSwapDir.h.
|
protectedinherited |
Definition at line 97 of file Disk.h.
Referenced by Store::Disk::maxSize().
|
inherited |
Definition at line 102 of file Disk.h.
Referenced by Fs::Ufs::UFSSwapDir::DirClean(), Rock::Rebuild::Stats::Init(), and Rock::Rebuild::Start().
|
inherited |
| uint64_t Rock::SwapDir::slotSize |
Definition at line 83 of file RockSwapDir.h.
Referenced by Rock::Rebuild::Rebuild().
Definition at line 144 of file RockSwapDir.h.
|
private |
Definition at line 146 of file RockSwapDir.h.